Closed
Description
The following code compiles on stable/beta/nightly:
#![allow(unused)]
struct S<T: Clone> { a: T }
struct NoClone;
// Okay, this is https://github.com/rust-lang/rust/issues/21903
type A = S<NoClone>;
fn main() {
// But this is something new.
// I'd expect an error "the trait bound `NoClone: std::clone::Clone` is not satisfied", but nothing is reported.
let s = A { a: NoClone };
// The error is properly reported when type alias is not used.
// let s = S { a: NoClone }; // ERROR: the trait bound `NoClone: std::clone::Clone` is not satisfied
}