summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-ctypes-73251-1.rs
blob: 145ba784f7c66955e5a3a8ee068c9e188388bd8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]

pub trait Baz {}

impl Baz for u32 {}

type Qux = impl Baz;

pub trait Foo {
    type Assoc;
}

impl Foo for u32 {
    type Assoc = Qux;
}

fn assign() -> Qux {
    1
}

extern "C" {
    pub fn lint_me() -> <u32 as Foo>::Assoc; //~ ERROR: uses type `Qux`
}

fn main() {}