diff options
Diffstat (limited to 'tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed')
-rw-r--r-- | tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed new file mode 100644 index 000000000..74f3c887f --- /dev/null +++ b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed @@ -0,0 +1,9 @@ +// run-rustfix +fn test(t: &mut dyn Iterator<Item=&u64>) -> u64 { + *t.min().unwrap() //~ ERROR the `min` method cannot be invoked on +} + +fn main() { + let array = [0u64]; + test(&mut array.iter()); +} |