summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/issue-84044-drop-non-mut.rs
blob: aed7750f1b9dfdaa2ccce9f6464edbc0cdd5b88c (plain)
1
2
3
4
5
6
// #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
}