-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
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
Remove cross-borrowing entirely #15349
Comments
This needs to be blocked on DST. @wycats pointed out in IRC that this breaks the ability to coerce |
Summary of IRC discussion: @pcwalton feels that |
Note that, per later discussion, this doesn't have to block cross-borrowing entirely, just cross-borrowing for traits. |
Assigning P-backcompat-lang, 1.0 milestone. |
except where trait objects are involved. Part of issue rust-lang#15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change] r? @alexcrichton
I’ve just discovered that |
Closes rust-lang#15349 [breaking-change] Trait objects are no longer implicitly coerced from Box<T> to &T. You must make an explicit coercion using `&*`.
…r=lnicola Show anonymous fn def type as a fn pointer in source code Fixes rust-lang#15346 The second commit is an unrelated change. I can remove it if not desired.
Tracking bug for RFC PR rust-lang/rfcs#139.
Nominating for 1.0, P-backcompat-lang.
The text was updated successfully, but these errors were encountered: