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