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
The following does not compile, but I expect it to! If the argument type is changed from &str to i32 (and the call site adapted), then it compiles. Playground
#![feature(fnbox)]use std::boxed::FnBox;structFunc{out:Box<FnBox(&str)>}implFunc{fncallme(self){let s = String::new();(self.out)(&s);}}