rust/tests/ui/crashes/needless_pass_by_value-w-late-bound.fixed

11 lines
248 B
Rust
Raw Normal View History

2023-07-27 06:40:22 -05:00
// https://github.com/rust-lang/rust/issues/107147
#![warn(clippy::needless_pass_by_value)]
struct Foo<'a>(&'a [(); 100]);
fn test(x: &Foo<'_>) {}
//~^ ERROR: this argument is passed by value, but not consumed in the function body
2023-07-27 06:40:22 -05:00
fn main() {}