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

Warnings for Issue 32330 #33105

Conversation

nikomatsakis
Copy link
Contributor

This code was already reviewed by @aturon in #32488. I was planning on incorporating it into a bigger PR but decided it'd be better to land it first after all.

r? @aturon

This is a step towards fixing rust-lang#32330. The full fix would be a breaking
change, so we begin by issuing warnings for scenarios that will break.
We ought not to be affecting inference state when assembling candidates,
so invoke select inside of a probe.
Before we would ignore a candidate if it happened to be an impl with a
default type. This change makes us never add the impl in the first
place. This seems largely equivalent, though there might be some subtle
difference in that -- before -- we would have failed to normalize if
there was a "trait-def-candidate" contending with an (opaque) impl
candidate. This corresponds I guess to a case like `<<A as Trait>::B as
Trait2>::C`, and the definition of `Trait` contains a clause. Pretty
obscure, but it seems like it's... ok to favor the trait definition in
such a case.
@nikomatsakis
Copy link
Contributor Author

Actually, I'll just re-open the original PR, duh.

@nikomatsakis
Copy link
Contributor Author

Oh, GH won't let me do that anymore. Oh well.

@nikomatsakis
Copy link
Contributor Author

@bors r=aturon

@bors
Copy link
Contributor

bors commented Apr 20, 2016

📌 Commit 3449575 has been approved by aturon

@nikomatsakis
Copy link
Contributor Author

@bors r-

@nikomatsakis
Copy link
Contributor Author

Remembered I wanted to update the issue number.

@nikomatsakis
Copy link
Contributor Author

Actually I lied. I will submit an expanded version of this branch after all that issues more warnings.

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.

3 participants