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
This contrived example compiles just fine, but running it results in a segmentation fault:
static UNIT: &'static &'static () = &&(); fn foo<'a, 'b, T>(_: &'a &'b (), v: &'b T) -> &'a T { v } fn bad<'a, T>(x: &'a T) -> &'static T { let f: fn(_, &'a T) -> &'static T = foo; f(UNIT, x) } fn main() { let r = bad(&Box::new(&10)); dbg!(r); }
Playground link
The problem occurs on multiple rustc versions.
The text was updated successfully, but these errors were encountered:
duplicate of #25860
Sorry, something went wrong.
Thanks, I tried to search for this but found no mention.
No branches or pull requests
This contrived example compiles just fine, but running it results in a segmentation fault:
Playground link
The problem occurs on multiple rustc versions.
The text was updated successfully, but these errors were encountered: