-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.A-impossible-boundsArea: Issues related to have impossible trait bounds in scope (impossible predicates)Area: Issues related to have impossible trait bounds in scope (impossible predicates)C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
Code
pub trait Trait {
type Assoc: Copy + 'static;
}
const fn conjure<T>() -> T {
panic!()
}
const fn get_assoc<T: Trait>() -> impl Copy {
conjure::<<T as Trait>::Assoc>()
}
pub fn foo<T: Trait<Assoc = i32> + Trait<Assoc = i64>>() {
const {
get_assoc::<T>();
}
}
(slightly adapted from @theemathas's example here)
Meta
cargo bisect-rustc
:
Regression in nightly-2024-11-27
- commit[0] 2024-11-25: Auto merge of Reduce integer
Display
implementation size #133247 - GuillaumeGomez:reduce-integer-display-impl, r=workingjubilee - commit[1] 2024-11-26: Auto merge of Update cargo and books #133465 - ehuss:update-cargo, r=ehuss
- commit[2] 2024-11-26: Auto merge of Refactor
where
predicates, and reserve for attributes support #132894 - frank-king:feature/where-refactor, r=cjgillot - commit[3] 2024-11-26: Auto merge of Rollup of 13 pull requests #133500 - GuillaumeGomez:rollup-4vcthwo, r=GuillaumeGomez
Error output
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: unexpected ambiguity: CanonicalQueryInput { canonical: Canonical { value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder { value: ProjectionPredicate(AliasTerm { args: [T/#0], def_id: DefId(0:4 ~ playground[81cc]::Trait::Assoc), .. }, Term::Ty(i64)), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTerm { args: [T/#0], def_id: DefId(0:4 ~ playground[81cc]::Trait::Assoc), .. }, Term::Ty(i32)), bound_vars: [] }, Binder { value: TraitPredicate(<T as Trait>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }] }, value: AliasTy { args: [T/#0], def_id: DefId(0:4 ~ playground[81cc]::Trait::Assoc), .. } }, max_universe: U0, variables: [] }, typing_mode: PostAnalysis } Canonical { value: QueryResponse { var_values: CanonicalVarValues { var_values: [] }, region_constraints: QueryRegionConstraints { outlives: [] }, certainty: Ambiguous, opaque_types: [], value: NormalizationResult { normalized_ty: ^0 } }, max_universe: U0, variables: [Ty(General(U0))] }
|
= note: delayed at compiler/rustc_trait_selection/src/traits/query/normalize.rs:288:30 - disabled backtrace
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.89.0 (29483883e 2025-08-04) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
@rustbot label A-impossible-bounds T-types regression-from-stable-to-stable
fmease and theemathas
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.A-impossible-boundsArea: Issues related to have impossible trait bounds in scope (impossible predicates)Area: Issues related to have impossible trait bounds in scope (impossible predicates)C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.