Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct MyFun(Box<Fn(&usize)>);
- impl MyFun {
- fn new() -> Self {
- Self(Box::new(&a_fun))
- }
- }
- trait MyTrait<'a> {
- fn foo(arg: &'a str) -> usize;
- }
- fn a_fun<'a, A>(arg: &'a usize) -> A where A: MyTrait<'a> {
- unimplemented!()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement