2021-03-16 21:47:06 +01:00
|
|
|
//@ edition:2021
|
|
|
|
|
|
|
|
fn function(x: &SomeTrait, y: Box<SomeTrait>) {
|
|
|
|
//~^ ERROR trait objects must include the `dyn` keyword
|
|
|
|
//~| ERROR trait objects must include the `dyn` keyword
|
|
|
|
let _x: &SomeTrait = todo!();
|
2023-10-31 13:45:26 +00:00
|
|
|
//~^ ERROR trait objects must include the `dyn` keyword
|
2021-03-16 21:47:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
trait SomeTrait {}
|
|
|
|
|
|
|
|
fn main() {}
|