Skip to content

Correct subtyping relations in pattern checking #20517

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 3 commits into from
Jan 6, 2015

Conversation

nikomatsakis
Copy link
Contributor

Fixes various safety issues.

r? @aturon

code. Previously we were creating a subtyping relation in the wrong
direction. We now just unify types, which is stronger than necessary
but turns out fine.

Fixes rust-lang#19552.
Fixes rust-lang#19997.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 5, 2015
impl<'a,'tcx> Foo<'a,'tcx> {
fn bother(&mut self) -> int {
self.elaborate_bounds(|this| {
// (*) Here: type of `this` is `&'f0 Foo<&'f1, '_2>`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this should be &'f0 mut Foo<'f1, '_2>? (&'f1 is not a type).

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 6, 2015
@bors bors merged commit dbfa054 into rust-lang:master Jan 6, 2015
@nikomatsakis nikomatsakis deleted the safety-issue-19997 branch March 30, 2016 16:17
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.

4 participants