about summary refs log tree commit diff
path: root/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
blob: 5d607d82ea1acc5c784529c3f5ebaabe91b17b52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ edition:2021

fn function(x: &SomeTrait, y: Box<SomeTrait>) {
    //~^ ERROR expected a type, found a trait
    //~| ERROR expected a type, found a trait
    let _x: &SomeTrait = todo!();
    //~^ ERROR expected a type, found a trait
}

trait SomeTrait {}

fn main() {}