fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
832 B22 linesraw
1error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut`
2  --> $DIR/issue-34349.rs:16:17
3   |
4LL |     let diary = || {
5   |                 ^^ this closure implements `FnMut`, not `Fn`
6LL |         farewell.push_str("!!!");
7   |         -------- closure is `FnMut` because it mutates the variable `farewell` here
8...
9LL |     apply(diary);
10   |     ----- ----- the requirement to implement `Fn` derives from here
11   |     |
12   |     required by a bound introduced by this call
13   |
14note: required by a bound in `apply`
15  --> $DIR/issue-34349.rs:11:32
16   |
17LL |     fn apply<F>(f: F) where F: Fn() {
18   |                                ^^^^ required by this bound in `apply`
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0525`.