Skip to content

Remove incorrect subtyping for &mut Trait and introduce coercion #23515

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 1 commit into from
Mar 24, 2015

Conversation

nikomatsakis
Copy link
Contributor

Remove incorrect subtyping for &mut Trait and introduce coercion for &mut (Trait+'a) to &mut (Trait+'b) if 'a:'b.

Fixes #14985.

r? @nrc

@eddyb
Copy link
Member

eddyb commented Mar 19, 2015

I wish you'd cc me on these.

@nikomatsakis
Copy link
Contributor Author

cc @eddyb :)

ty::mt { ty: ty, mutbl: a_mt.mutbl }
}
_ => try!(this.mts(a_mt, b_mt))
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

@nrc
Copy link
Member

nrc commented Mar 19, 2015

r+ modulo nits

for `&mut (Trait+'a)` to `&mut (Trait+'b)` if `'a:'b`.

Fixes rust-lang#14985.
@nikomatsakis nikomatsakis force-pushed the issue-14985-trait-subtyping branch from 0667c5e to 50ea6f6 Compare March 23, 2015 10:00
@nikomatsakis
Copy link
Contributor Author

@bors r=nrc 50ea6f6

@bors
Copy link
Collaborator

bors commented Mar 23, 2015

⌛ Testing commit 50ea6f6 with merge 349fbc5...

@bors
Copy link
Collaborator

bors commented Mar 23, 2015

⛄ The build was interrupted to prioritize another pull request.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 23, 2015
…ping

Remove incorrect subtyping for `&mut Trait` and introduce coercion for `&mut (Trait+'a)` to `&mut (Trait+'b)` if `'a:'b`.

Fixes rust-lang#14985.

r? @nrc
@bors bors merged commit 50ea6f6 into rust-lang:master Mar 24, 2015
@nikomatsakis nikomatsakis deleted the issue-14985-trait-subtyping branch March 30, 2016 16:13
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.

Should bounds on mut trait objects be covariant?
4 participants