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

do not fetch variance for items when equating #41913

Merged
merged 1 commit into from
May 11, 2017

Conversation

nikomatsakis
Copy link
Contributor

Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise later as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)

r? @eddyb

Fixes rust-lang#41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)
@nikomatsakis nikomatsakis added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 11, 2017
@nikomatsakis
Copy link
Contributor Author

Nominated for beta -- regression.

@eddyb
Copy link
Member

eddyb commented May 11, 2017

@bors r+

@bors
Copy link
Contributor

bors commented May 11, 2017

📌 Commit d22d1fe has been approved by eddyb

@bors
Copy link
Contributor

bors commented May 11, 2017

⌛ Testing commit d22d1fe with merge e40beb3...

bors added a commit that referenced this pull request May 11, 2017
do not fetch variance for items when equating

Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)

r? @eddyb
@bors
Copy link
Contributor

bors commented May 11, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing e40beb3 to master...

@bors bors merged commit d22d1fe into rust-lang:master May 11, 2017
@brson brson added the beta-accepted Accepted for backporting to the compiler in the beta channel. label May 23, 2017
@brson
Copy link
Contributor

brson commented May 23, 2017

Accepted for beta because I trust niko.

@brson
Copy link
Contributor

brson commented May 23, 2017

Doesn't pick cleanly @nikomatsakis

@nikomatsakis nikomatsakis mentioned this pull request May 23, 2017
bors added a commit that referenced this pull request May 24, 2017
Beta backports

Backports of:

- #41913 (or some of it)
- #41937
- #41716
- #41563
@nikomatsakis nikomatsakis removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants