summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/lint-ctypes-73251.rs
blob: a00d1a75aec2c483224c65db85ac396da27fbea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// check-pass

#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]

trait Foo {
    type Assoc;
}

impl Foo for () {
    type Assoc = u32;
}

type Bar = impl Foo<Assoc = u32>;

fn assign() -> Bar {}

extern "C" {
    fn lint_me() -> <Bar as Foo>::Assoc;
}

fn main() {}