summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused/unused-allocation.stderr
blob: c9ccfbd30e5d42d0135499bc57dcdb899eeb714c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
error: unnecessary allocation, use `&` instead
  --> $DIR/unused-allocation.rs:5:9
   |
LL |     _ = (#[rustc_box] Box::new([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