Skip to content
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

Fixed regression in associated item resolution #28395

Merged
merged 4 commits into from
Sep 15, 2015

Conversation

ebfull
Copy link
Contributor

@ebfull ebfull commented Sep 13, 2015

Fixes #28344

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

ty_param_defs
.iter()
.map(|p| this.ty_infer(Some(p.clone()), Some(&mut substs), Some(TypeSpace), span))
.map(|p| {
Copy link
Contributor

Choose a reason for hiding this comment

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

This code rather needs some refactoring (at least, split it into another method).

@alexcrichton
Copy link
Member

r? @nrc

@rust-highfive rust-highfive assigned nrc and unassigned alexcrichton Sep 14, 2015
@@ -412,10 +412,26 @@ fn create_substs_for_ast_path<'tcx>(
// they were optional (e.g. paths inside expressions).
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have extracted the entire is_empty() line

@arielb1
Copy link
Contributor

arielb1 commented Sep 14, 2015

@bors r+ 4fec679

@bors
Copy link
Contributor

bors commented Sep 14, 2015

⌛ Testing commit 4fec679 with merge 3332ae5...

@bors
Copy link
Contributor

bors commented Sep 14, 2015

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member

@bors: retry

On Mon, Sep 14, 2015 at 6:39 AM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-linux-64-x-android-t
http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/6382


Reply to this email directly or view it on GitHub
#28395 (comment).

@bors
Copy link
Contributor

bors commented Sep 15, 2015

⌛ Testing commit 4fec679 with merge a7b3eed...

@bors bors merged commit 4fec679 into rust-lang:master Sep 15, 2015
@arielb1
Copy link
Contributor

arielb1 commented Sep 15, 2015

This is a 1.2-1.3 regression (#27591 is a runnable example) - may be worth backporting

@alexcrichton
Copy link
Member

We're currently very close to 1.3 being released, so while not impossible it would be difficult to backport more PRs. With that in mind, it looks like this is just improving an ICE to be a first-class error message instead? Is there code that compiles on stable which does not compile on nightly right now?

If it's just an improvement to the error message I'm inclined to not backport this as it's so close to the release, but it's not clear to me if that's the only part which was fixed.

@ebfull
Copy link
Contributor Author

ebfull commented Sep 15, 2015

Yes, this only improves diagnostics.

@brson brson added I-needs-decision Issue: In need of a decision. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Sep 15, 2015
@brson
Copy link
Contributor

brson commented Sep 15, 2015

cc @rust-lang/compiler @rust-lang/lang this was suggested for backporting to 1.3, which we are building today. Needs decision fast.

@aturon
Copy link
Member

aturon commented Sep 15, 2015

Note that most of the code in this diff is tests. I am reasonably comfortable backporting.

@ebfull
Copy link
Contributor Author

ebfull commented Sep 15, 2015

I recommend against backporting (this late). In the best case scenario this only affects diagnostics. Most of the code is tests, but this area of the code was not well tested before this change.

@brson
Copy link
Contributor

brson commented Sep 15, 2015

I also don't feel comfortable backporting.

@brson brson removed the I-needs-decision Issue: In need of a decision. label Sep 15, 2015
@arielb1
Copy link
Contributor

arielb1 commented Sep 16, 2015

The code in #27591 is an rpass example of this, but I guess too late.

@alexcrichton alexcrichton added T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Sep 23, 2015
@alexcrichton
Copy link
Member

Removing beta-nominated as the release was made

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.

8 participants