mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
16 lines
268 B
Rust
16 lines
268 B
Rust
//@ edition: 2021
|
|
|
|
trait Trait {}
|
|
|
|
impl dyn Trait {
|
|
const CONST: () = ();
|
|
}
|
|
|
|
fn main() {
|
|
match () {
|
|
Trait::CONST => {}
|
|
//~^ ERROR expected a type, found a trait
|
|
//~| HELP you can add the `dyn` keyword if you want a trait object
|
|
}
|
|
}
|