3 The tracking issue for this feature is: [#41517]
5 [#41517]: https://github.com/rust-lang/rust/issues/41517
7 ------------------------
9 The `trait_alias` feature adds support for trait aliases. These allow aliases
10 to be created for one or more traits (currently just a single regular trait plus
11 any number of auto-traits), and used wherever traits would normally be used as
12 either bounds or trait objects.
15 #![feature(trait_alias)]
17 trait Foo = std::fmt::Debug + Send;
18 trait Bar = Foo + Sync;
20 // Use trait alias as bound on type parameter.
21 fn foo<T: Foo>(v: &T) {
28 // Use trait alias for trait objects.
31 let b = Box::new(456) as Box<dyn Foo>;