-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE: instantiate_value_path: (UFCS) Fail<T/#0> was a subtype of Fail<i32> but now is not?
#126062
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Jun 6, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jun 6, 2024
Further reduced struct Fail<T>;
impl Fail<i32> {
const C: () = ();
}
fn main() {
Fail::<()>::C
} |
lmao I had a suspicion this is variance related...
|
Yeah, but if that's bivariant then |
Because if we're invariant, we don't load the variance and just use invariant for all generic args. So subtyping will succeed and equating will fail |
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jun 13, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jun 14, 2024
Consistently use subtyping in method resolution fixes rust-lang#126062 An earlier version of this PR modified how we compute variance, but the root cause was an inconsistency between the usage of `eq` and `sub`, where we assumed that the latter passing implies the former will pass. r? `@compiler-errors`
matthiaskrgr
added
the
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
label
Jun 17, 2024
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jun 17, 2024
Consistently use subtyping in method resolution fixes rust-lang#126062 An earlier version of this PR modified how we compute variance, but the root cause was an inconsistency between the usage of `eq` and `sub`, where we assumed that the latter passing implies the former will pass. r? `@compiler-errors`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original code
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: