Skip to content

Remove cross-borrowing for traits #16917

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

Merged
merged 2 commits into from
Sep 3, 2014
Merged

Remove cross-borrowing for traits #16917

merged 2 commits into from
Sep 3, 2014

Conversation

nrc
Copy link
Member

@nrc nrc commented Sep 1, 2014

Closes #15349

r? @pcwalton (or anyone else)

@nrc
Copy link
Member Author

nrc commented Sep 1, 2014

Note that the first commit is a different PR - #16915

nrc added 2 commits September 3, 2014 08:29
For example `let _x: &Trait = &*(box Foo as Box<Trait>);`. There was a bug where no cleanup would be scheduled by the deref.

No test because cleanup-auto-borrow-obj.rs is a test for this once we remove trait cross-borrowing (done on another branch).
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 `&*`.
bors added a commit that referenced this pull request Sep 3, 2014
@bors bors closed this Sep 3, 2014
@bors bors merged commit 7f72884 into rust-lang:master Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove cross-borrowing entirely
2 participants