Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Foo;
- trait Bar
- {
- fn bar(self);
- }
- impl Bar for &Foo
- {
- fn bar(self)
- {
- }
- }
- fn test<'a> (x: &'a Foo)
- {
- //QUESTION!:
- // v---< is this lifetime inferred to be 'a ?
- <&'_ Foo>::bar(x);
- }
- fn main() {
- test(&Foo);
- }
Add Comment
Please, Sign In to add comment