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 following testcase crashes at runtime when call_f is called the second time. It appears rustc accepts to move the value t into "both" heap closures.
fn call_f(f: ~fn:Owned() -> int) -> int {
f()
}
fn main() {
let t = ~3;
call_f(|| { *t + 1 });
call_f(|| { *t + 1 });
}
Tested with version f1e09d6 / rustc 0.6 (f1e09d6 2013-06-26 23:07:41 -0700)
…=llogiq
Add a suggestion and a note about orphan rules for `from_over_into`
Adds a machine applicable suggestion to convert the `Into` impl into a `From` one to `from_over_into`
Also adds a note explaining that `impl From<Local> for Foreign` is fine if the `Into` type is foreign
Closesrust-lang#7444
Addresses half of rust-lang#9638
changelog: [`from_over_into`] Add a suggestion and a note about orphan rules
The following testcase crashes at runtime when call_f is called the second time. It appears rustc accepts to move the value t into "both" heap closures.
Tested with version f1e09d6 / rustc 0.6 (f1e09d6 2013-06-26 23:07:41 -0700)
Assign to @bblum
The text was updated successfully, but these errors were encountered: