-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Labels
A-coherenceArea: CoherenceArea: CoherenceA-specializationArea: Trait impl specializationArea: Trait impl specializationA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-specialization`#![feature(specialization)]``#![feature(specialization)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessS-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.Status: This bug is tracked inside the repo by a `known-bug` test.T-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.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.Fixed by the next-generation trait solver, `-Znext-solver`.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
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>;
}
let eligible = match &impl_source { |
Metadata
Metadata
Assignees
Labels
A-coherenceArea: CoherenceArea: CoherenceA-specializationArea: Trait impl specializationArea: Trait impl specializationA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-specialization`#![feature(specialization)]``#![feature(specialization)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessS-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.Status: This bug is tracked inside the repo by a `known-bug` test.T-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.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.Fixed by the next-generation trait solver, `-Znext-solver`.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.