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

pub trait Baz {}

impl Baz for u32 {}

type Qux = impl Baz;

fn assign() -> Qux {
    3
}

#[repr(transparent)]
pub struct A {
    x: Qux,
}

extern "C" {
    pub fn lint_me() -> A; //~ ERROR: uses type `Qux`
}

fn main() {}