]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/lint-ctypes-73251-1.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / 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() {}