rust/tests/ui/closures/issue-84044-drop-non-mut.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
154 B
Rust
Raw Normal View History

// #84044: This used to ICE.
fn main() {
let f = || {};
drop(&mut f); //~ ERROR cannot borrow `f` as mutable, as it is not declared as mutable
}