We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trait IDummy { fn do_nothing(&self); } struct A { a: int } struct B<'self> { b: int, pa: &'self A } impl IDummy for A { fn do_nothing(&self) { io::println("A::do_nothing() is called"); } } impl<'self> B<'self> { fn get_pa(&self) -> &'self IDummy { self.pa as &'self IDummy } } #[test] fn test_borrowed_ptr() { let sa = A { a: 100 }; let sb = B { b: 200, pa: &sa }; io::println(fmt!("sa is %?", sa)); io::println(fmt!("sb is %?", sb)); io::println(fmt!("sb.pa is %?", sb.get_pa())); }
The text was updated successfully, but these errors were encountered:
Still relevant on master.
blorg.rs:15:40: 15:64 error: internal compiler error: Cannot relate bound region as subregion: br_self blorg.rs:15 fn get_pa(&self) -> &'self IDummy { self.pa as &'self IDummy } ^~~~~~~~~~~~~~~~~~~~~~~~
Sorry, something went wrong.
a02a759
No branches or pull requests
The text was updated successfully, but these errors were encountered: