2024-08-24 15:03:51 -04:00
|
|
|
//@ edition: 2021
|
|
|
|
|
|
|
|
|
|
trait Trait {}
|
|
|
|
|
|
|
|
|
|
impl dyn Trait {
|
|
|
|
|
const CONST: () = ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
match () {
|
|
|
|
|
Trait::CONST => {}
|
2024-10-04 16:10:28 +02:00
|
|
|
//~^ ERROR expected a type, found a trait
|
|
|
|
|
//~| HELP you can add the `dyn` keyword if you want a trait object
|
2024-08-24 15:03:51 -04:00
|
|
|
}
|
|
|
|
|
}
|