about summary refs log tree commit diff
path: root/tests/ui/associated-types/associated-type-call.rs
blob: ffe540c329eb9a67125359917cc20b469a72d723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// issue: <https://github.com/rust-lang/rust/issues/142473>
//
//@ run-rustfix
#![allow(unused)]
struct T();

trait Trait {
    type Assoc;

    fn f();
}

impl Trait for () {
    type Assoc = T;

    fn f() {
        <Self>::Assoc();
        //~^ ERROR no associated item named `Assoc` found for unit type `()` in the current scope
    }
}

fn main() {}