]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/issue-84044-drop-non-mut.stderr
Rollup merge of #93813 - xldenis:public-mir-passes, r=wesleywiser
[rust.git] / src / test / ui / closures / issue-84044-drop-non-mut.stderr
1 error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
2   --> $DIR/issue-84044-drop-non-mut.rs:5:10
3    |
4 LL |     let f = || {};
5    |         - help: consider changing this to be mutable: `mut f`
6 LL |     drop(&mut f);
7    |          ^^^^^^ cannot borrow as mutable
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0596`.