You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnitem_bound_is_too_weak(b:bool) -> implFnOnce() -> u32{if b {letmut var = item_bound_is_too_weak(false);println!("{}", var());println!("{}", var());}letmut state = 0u32;move || {
state += 1;
state
}}fnmain(){item_bound_is_too_weak(true);}
this results in 1 1 because we unnecessarily assume the fn call to be FnOnce which then copies the closure. Should mention in the stabilization report and also... maybe lint when copying closures xd