rust/tests/ui/lint/unused/unused-allocation.rs
2025-01-03 12:01:31 +01:00

6 lines
123 B
Rust

#![deny(unused_allocation)]
fn main() {
_ = Box::new([1]).len(); //~ error: unnecessary allocation, use `&` instead
}