- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.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-langRelevant to the language teamRelevant to the language team
Description
Meta
rustc 1.15.0-nightly (71c06a56a 2016-12-18)
STR
trait Q<T:?Sized> {}
trait Foo where u32: Q<Self> {
    fn foo(&self);
}
impl Q<()> for u32 {}
impl Foo for () {
    fn foo(&self) {
        println!("foo!");
    }
}
fn main() {
    let _f: Box<Foo> = Box::new(());
}Expected Result
Box<Foo> is not well-formed, because u32: Q<Foo> does not hold.
Actual Result
Code compiles.
This does not seem to cause any trouble, but is a potential future-compatibility hazard if we start elaborating these bounds.
Metadata
Metadata
Assignees
Labels
I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.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-langRelevant to the language teamRelevant to the language team