You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MIR borrowck considers variables still initialized after their storage ends, so if an immutable variable is defined and used in a loop, this causes an error. e.g.:
fnmain(){loop{let _x = 0;}}
Which causes:
$ rustc x.rs -Z borrowck-mir
error[E0384]: re-assignment of immutable variable `_x` (Mir)
--> x.rs:3:18
|
3 | let _x = 0;
| ^
error: aborting due to previous error
The text was updated successfully, but these errors were encountered:
MIR borrowck considers variables still initialized after their storage ends, so if an immutable variable is defined and used in a loop, this causes an error. e.g.:
Which causes:
The text was updated successfully, but these errors were encountered: