Description
which is unsound during coherence, as coherence requires completeness
#![feature(specialization)]
trait Default {
type Id;
}
impl<T> Default for T {
default type Id = T;
}
trait Overlap {
type Assoc;
}
impl Overlap for u32 {
type Assoc = usize;
}
impl Overlap for <u32 as Default>::Id {
type Assoc = Box<usize>;
}
Metadata
Metadata
Assignees
Labels
Area: CoherenceArea: Trait impl specializationArea: Trait systemCategory: This is a bug.`#![feature(specialization)]`Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessStatus: This bug is tracked inside the repo by a `known-bug` test.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.Fixed by the next-generation trait solver, `-Znext-solver`.This issue requires a nightly compiler in some way.