mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
add additonal non-trigger testcase
This commit is contained in:
parent
7cdaa3b574
commit
eabc64f56c
2 changed files with 4 additions and 1 deletions
|
@ -63,6 +63,9 @@ mod should_not_trigger {
|
|||
fn allocator_mismatch() -> Vec<Box<i32, DummyAllocator>> {
|
||||
Vec::new()
|
||||
}
|
||||
fn allocator_mismatch_2() -> Vec<Box<i32>, DummyAllocator> {
|
||||
Vec::new_in(DummyAllocator)
|
||||
}
|
||||
}
|
||||
|
||||
mod inner_mod {
|
||||
|
|
|
@ -50,7 +50,7 @@ LL | fn allocator_match() -> Vec<Box<i32, DummyAllocator>, DummyAllocator> {
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
|
||||
|
||||
error: `Vec<T>` is already on the heap, the boxing is unnecessary
|
||||
--> $DIR/vec_box_sized.rs:76:23
|
||||
--> $DIR/vec_box_sized.rs:79:23
|
||||
|
|
||||
LL | pub fn f() -> Vec<Box<S>> {
|
||||
| ^^^^^^^^^^^ help: try: `Vec<S>`
|
||||
|
|
Loading…
Reference in a new issue