summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-84919.rs
blob: a0b73743a2b2dc98109e7088d2ea8e7a8b02fe21 (plain)
1
2
3
4
5
6
7
8
9
trait Trait {}
impl Trait for () {}

fn foo<'a: 'a>() {
    let _x: impl Trait = ();
    //~^ `impl Trait` only allowed in function and inherent method return types
}

fn main() {}