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
The following code compiles and outputs &10.
&10
fn each<T>(x: &[T], op: fn(elem: &T) -> bool) { uint::range(0, x.len(), |i| op(&x[i])); } fn main() { let x = ~[{mut a: 0}]; for each(x) |y| { let z = &y.a; x[0].a = 10; log(error, z); } }
It also fails if you use vec::each, which uses reference modes instead of region pointers. It should be rejected.
vec::each
The text was updated successfully, but these errors were encountered:
22a14dd
Actually the fix was wrong. I have a pending more correct fix.
Sorry, something went wrong.
More complete fix to #3162 (borrowck bug related to access to rec fie…
a08f3a7
…lds)
Should be fixed for real now.
More complete fix to rust-lang#3162 (borrowck bug related to access t…
16727d9
…o rec fields)
Auto merge of rust-lang#3162 - RalfJung:random, r=RalfJung
2832253
share getentropy shim across various unixes
nikomatsakis
No branches or pull requests
The following code compiles and outputs
&10
.It also fails if you use
vec::each
, which uses reference modes instead of region pointers. It should be rejected.The text was updated successfully, but these errors were encountered: