blob: 35149fdfba08433b3f5b53fcbe7b78e54312a697 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//@ check-pass
#![feature(trait_alias)]
trait Foo<T> {}
trait Bar { type Assoc; }
trait Alias<T: Bar> = Foo<T>;
// Check that an alias only requires us to specify the associated types
// of the principal's supertraits. For example, we shouldn't require
// specifying the type `Assoc` on trait `Bar` just because we have some
// `T: Bar` where clause on the alias... because that makes no sense.
fn use_alias<T: Bar>(x: &dyn Alias<T>) {}
fn main() {}
|