-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rust 1.19 regression: cyclic reference detected for rusttype #41849
Labels
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
cc @nikomatsakis looks like fallout from a recent query-fication. |
nikomatsakis
added
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
May 9, 2017
triage: P-high |
Hmm. So the problem is, more specifically, due to the fact that I removed the hacky "variance-computed-yet?" flag. The proper fix is for equality relations to ignore variance, I think. PR coming up. Thanks @Mark-Simulacrum for that handy tool btw! |
nikomatsakis
added a commit
to nikomatsakis/rust
that referenced
this issue
May 11, 2017
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.)
Fix in #41913 |
bors
added a commit
that referenced
this issue
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
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 12, 2017
…oerce-unsized-cycle, r=eddyb use equality in the coerce-unsized check This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.) Fixes rust-lang#41936. r? @eddyb
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 12, 2017
…oerce-unsized-cycle, r=eddyb use equality in the coerce-unsized check This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.) Fixes rust-lang#41936. r? @eddyb
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 16, 2017
…oerce-unsized-cycle, r=eddyb use equality in the coerce-unsized check This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.) Fixes rust-lang#41936. r? @eddyb
nikomatsakis
added a commit
to nikomatsakis/rust
that referenced
this issue
May 23, 2017
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.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Prior to
rustc 1.19.0-nightly (f1140a331 2017-05-08)
, rusttype 0.2.1 could compile okay. Now it gives the following error:Steps to reproduce:
A minimal example that reproduces this (playpen's nightly is still on
f4209651e 2017-05-05
so it compiles):I have no idea why that reproduces it; I broke my brain coming up with that code.
My rustc version:
This is also seen on linux and OS X, such as in this travis build
The text was updated successfully, but these errors were encountered: