mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
12 lines
282 B
Rust
12 lines
282 B
Rust
#![feature(trait_alias)]
|
|
|
|
trait EqAlias = Eq;
|
|
trait IteratorAlias = Iterator;
|
|
|
|
fn main() {
|
|
let _: &dyn EqAlias = &123;
|
|
//~^ ERROR the trait `Eq` cannot be made into an object [E0038]
|
|
let _: &dyn IteratorAlias = &vec![123].into_iter();
|
|
//~^ ERROR must be specified
|
|
}
|