]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-ctypes-73251-1.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / lint-ctypes-73251-1.rs
1 #![feature(type_alias_impl_trait)]
2 #![deny(improper_ctypes)]
3
4 pub trait Baz {}
5
6 impl Baz for u32 {}
7
8 type Qux = impl Baz;
9
10 pub trait Foo {
11     type Assoc;
12 }
13
14 impl Foo for u32 {
15     type Assoc = Qux;
16 }
17
18 fn assign() -> Qux {
19     1
20 }
21
22 extern "C" {
23     pub fn lint_me() -> <u32 as Foo>::Assoc; //~ ERROR: uses type `Qux`
24 }
25
26 fn main() {}