-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Using a trait's Associated Type in a different trait's impl declaration crashes #132826
Labels
A-coherence
Area: Coherence
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.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
auto reduction: //@compile-flags: --edition=2021
use std::collections::HashMap;
pub trait MyTrait {
type Item;
}
impl<K, V> MyTrait for HashMap<K, V> {
type Item = HashMap<K>;
}
impl<K, V> ::core::convert::From<HashMap<K, V>> for <HashMap<K, V> as MyTrait>::Item {} bisects to #125667 |
fmease
added a commit
to fmease/rust
that referenced
this issue
Jan 27, 2025
…apkin add two old crash tests This is for rust-lang#108248 and rust-lang#132826.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 27, 2025
Rollup merge of rust-lang#136072 - cyrgani:old-crash-tests, r=WaffleLapkin add two old crash tests This is for rust-lang#108248 and rust-lang#132826.
@rustbot label S-bug-has-test |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Mar 20, 2025
…mease Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType` The ordering of ty var unification means that we may end up with a root variable whose ty var origin is from another item's params. Let's not rely on this by just unifying the infer vars with the params of the impl + resolving. It's kinda goofy but it's clearer IMO. Fixes rust-lang#132826. r? ``@fmease`` or ``@lcnr``
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 21, 2025
Rollup merge of rust-lang#138727 - compiler-errors:ty-var-origin, r=fmease Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType` The ordering of ty var unification means that we may end up with a root variable whose ty var origin is from another item's params. Let's not rely on this by just unifying the infer vars with the params of the impl + resolving. It's kinda goofy but it's clearer IMO. Fixes rust-lang#132826. r? `@fmease` or `@lcnr`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-coherence
Area: Coherence
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.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: