// 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() {
        T();
        //~^ ERROR no associated function or constant named `Assoc` found for unit type `()` in the current scope
    }
}

fn main() {}
