rust/tests/ui/lint/unused/unused-allocation.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
123 B
Rust
Raw Normal View History

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