rust/tests/ui/lint/unused/unused-allocation.stderr
Maybe Waffle ff5f784140 Add a test for unused_allocation lint
(how come we didn't have one already??)
2023-03-03 17:47:40 +00:00

21 lines
481 B
Plaintext

error: unnecessary allocation, use `&` instead
--> $DIR/unused-allocation.rs:5:9
|
LL | _ = (box [1]).len();
| ^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/unused-allocation.rs:2:9
|
LL | #![deny(unused_allocation)]
| ^^^^^^^^^^^^^^^^^
error: unnecessary allocation, use `&` instead
--> $DIR/unused-allocation.rs:6:9
|
LL | _ = Box::new([1]).len();
| ^^^^^^^^^^^^^
error: aborting due to 2 previous errors