Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Foo;
- // works
- fn one<'a>() -> &'a Foo {
- // v------------+
- let _reference : &'a Foo = & Foo;// +---< is the lifetime of this borrow 'static or 'a ?
- _reference
- }
- fn main() {
- one();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement