summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-inherent-types/issue-111879-1.rs
blob: 7acc4f945051edb3556386bb7844fbfdf70e607e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(inherent_associated_types)]
#![allow(incomplete_features)]

// Check that we don't crash when printing inherent projections in diagnostics.

struct Foo<T>(T);

impl<'a> Foo<fn(&'a ())> {
    type Assoc = &'a ();
}

fn main(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {} //~ ERROR `main` function has wrong type