mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
11 lines
248 B
Rust
11 lines
248 B
Rust
|
// 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
|
||
|
|
||
|
fn main() {}
|