summaryrefslogtreecommitdiffstats
path: root/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
blob: 0f05d8753eaa58cbfde26b1baab1935cc2a56381 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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!();
}

trait SomeTrait {}

fn main() {}