rust/tests/ui/traits/alias/syntax-fail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
314 B
Rust
Raw Normal View History

2019-02-11 19:50:45 -06:00
#![feature(trait_alias)]
trait Foo {}
auto trait A = Foo; //~ ERROR trait aliases cannot be `auto`
unsafe trait B = Foo; //~ ERROR trait aliases cannot be `unsafe`
trait C: Ord = Eq; //~ ERROR bounds are not allowed on trait aliases
trait D: = Eq; //~ ERROR bounds are not allowed on trait aliases
2019-02-11 19:50:45 -06:00
fn main() {}