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
Issue by thestinger Wednesday Mar 12, 2014 at 21:15 GMT
For earlier discussion, see rust-lang/rust#12853
This issue was labelled with: A-lifetimes in the Rust repository
The following works:
fn foo<'a>(xs: &'a [int]) -> &'a [int] { if xs.len() & 1 == 0 { static ys: &'static [int] = &[1, 2, 3]; ys } else { xs } }
This should also work, but does not:
fn foo<'a>(xs: &'a [int]) -> &'a [int] { if xs.len() & 1 == 0 { &[1, 2, 3] } else { xs } }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Wednesday Mar 12, 2014 at 21:15 GMT
For earlier discussion, see rust-lang/rust#12853
This issue was labelled with: A-lifetimes in the Rust repository
The following works:
This should also work, but does not:
The text was updated successfully, but these errors were encountered: