diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-34349.stderr | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-34349.stderr b/src/test/ui/issues/issue-34349.stderr new file mode 100644 index 000000000..d0b51961b --- /dev/null +++ b/src/test/ui/issues/issue-34349.stderr @@ -0,0 +1,14 @@ +error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut` + --> $DIR/issue-34349.rs:16:17 + | +LL | let diary = || { + | ^^ this closure implements `FnMut`, not `Fn` +LL | farewell.push_str("!!!"); + | -------- closure is `FnMut` because it mutates the variable `farewell` here +... +LL | apply(diary); + | ----- the requirement to implement `Fn` derives from here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0525`. |