]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/issue-84044-drop-non-mut.rs
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
[rust.git] / tests / ui / closures / issue-84044-drop-non-mut.rs
1 // #84044: This used to ICE.
2
3 fn main() {
4     let f = || {};
5     drop(&mut f); //~ ERROR cannot borrow `f` as mutable, as it is not declared as mutable
6 }