1 2 3 4 5 6 7 8 9 10 11 12 13 14
#![feature(inherent_associated_types)] #![allow(incomplete_features)] struct S<T>(T); impl<T> S<T> { type X = () where T: Copy; } fn main() { let _: S::<String>::X; //~ ERROR the trait bound `String: Copy` is not satisfied }