We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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 first fruit of my MIR type-checking work:
pub fn cbk(x: usize) -> usize { [0][x] }
Generated MIR:
fn(arg0: usize) -> usize { let var0: usize; // x let mut tmp0: usize; let mut tmp1: [usize; 1]; let mut tmp2: (); let mut tmp3: usize; let mut tmp4: usize; let mut tmp5: bool; let mut tmp6: (&'static str, u32); let mut tmp7: &(&'static str, u32); bb0: { var0 = arg0; tmp1 = [const 0]; tmp3 = var0; tmp4 = Len(tmp1); tmp5 = Lt(tmp3, tmp4); if(tmp5) -> [true: bb2, false: bb3]; } bb1: { return; } bb2: { tmp0 = tmp1[tmp3]; return = tmp0; goto -> bb1; } bb3: { tmp6 = (const "panic.rs", const 7); tmp7 = &mut tmp6; //~ ERROR &mut and late-bound region! core::panicking::panic_bounds_check(tmp7, tmp3, tmp4); } }
The text was updated successfully, but these errors were encountered:
The tmp6 is supposed to become a constant (promoted rvalue) once we have a capability to make these happen. This justifies the ReStatic region.
tmp6
Sorry, something went wrong.
I guess. We just have to get rvalue promotion (or whatever) done before MIR borrowck.
b7cbbc3
No branches or pull requests
The first fruit of my MIR type-checking work:
Generated MIR:
The text was updated successfully, but these errors were encountered: