- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-associated_type_bounds`#![feature(associated_type_bounds)]``#![feature(associated_type_bounds)]`F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`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.
Description
This should pass but does not:
// check-pass
#![feature(associated_type_bounds)]
#![feature(type_alias_impl_trait)]
fn main() {}
trait Bar { type Assoc; }
trait Thing {
    type Out;
    fn func() -> Self::Out;
}
struct AssocIsCopy;
impl Bar for AssocIsCopy { type Assoc = u8; }
impl Thing for AssocIsCopy {
    type Out = impl Bar<Assoc: Copy>;
    fn func() -> Self::Out {
        AssocIsCopy
        //~^ ERROR the trait bound `<AssocIsCopy as Bar>::Assoc: std::marker::Copy` is not satisfied
    }
}Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-associated_type_bounds`#![feature(associated_type_bounds)]``#![feature(associated_type_bounds)]`F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`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.
Type
Projects
Status
Done