Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub trait RestrictiveFn: Fn(&mut i32) + Send + Sync + 'static { }
- impl<T> RestrictiveFn for T where T: Fn(&mut i32) + Send + Sync + 'static { }
- struct Fine {
- member: Box<Fn(&mut i32) + Send + Sync + 'static>,
- }
- struct Confusing {
- member: Box<RestrictiveFn>,
- }
- struct VerboseButOk {
- member: Box<RestrictiveFn<Output=()>>,
- }
- pub trait ReturnDoesNotHelp: Fn(&mut i32) -> () + Send + Sync + 'static { }
- impl<T> ReturnDoesNotHelp for T where T: Fn(&mut i32) -> () + Send + Sync + 'static { }
- struct ConfusingAgain {
- member: Box<ReturnDoesNotHelp>,
- }
- fn main() { }
Add Comment
Please, Sign In to add comment