diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/crashes/needless_pass_by_value-w-late-bound.fixed')
-rw-r--r-- | src/tools/clippy/tests/ui/crashes/needless_pass_by_value-w-late-bound.fixed | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/crashes/needless_pass_by_value-w-late-bound.fixed b/src/tools/clippy/tests/ui/crashes/needless_pass_by_value-w-late-bound.fixed new file mode 100644 index 000000000..774dea391 --- /dev/null +++ b/src/tools/clippy/tests/ui/crashes/needless_pass_by_value-w-late-bound.fixed @@ -0,0 +1,10 @@ +// 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() {} |