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
The pointer to integer cast has an implicit side effect of exposing the provenance, so it cannot be removed under strict provenance model.
Example of an incorrect transformation:
pubfnexpose_addr<T>(a:&T){
a as*constTasusize;}
-// MIR for `expose_addr` before SimplifyLocals+// MIR for `expose_addr` after SimplifyLocals
fn expose_addr(_1: &T) -> () {
debug a => _1; // in scope 0 at a.rs:1:23: 1:24
let mut _0: (); // return place in scope 0 at a.rs:1:30: 1:30
- let _2: usize; // in scope 0 at a.rs:2:5: 2:27- let mut _3: *const T; // in scope 0 at a.rs:2:5: 2:18
bb0: {
- _3 = &raw const (*_1); // scope 0 at a.rs:2:5: 2:6- _2 = move _3 as usize (Misc); // scope 0 at a.rs:2:5: 2:27
return; // scope 0 at a.rs:3:2: 3:2
}
}
The text was updated successfully, but these errors were encountered:
The pointer to integer cast has an implicit side effect of exposing the provenance, so it cannot be removed under strict provenance model.
Example of an incorrect transformation:
The text was updated successfully, but these errors were encountered: