]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-ctypes-73249-5.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / lint / lint-ctypes-73249-5.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 //[full_tait]~^ WARN incomplete
5 #![deny(improper_ctypes)]
6
7 pub trait Baz { }
8
9 impl Baz for u32 { }
10
11 type Qux = impl Baz;
12
13 fn assign() -> Qux { 3 }
14
15 #[repr(transparent)]
16 pub struct A {
17     x: Qux,
18 }
19
20 extern "C" {
21     pub fn lint_me() -> A; //~ ERROR: uses type `impl Baz`
22 }
23
24 fn main() {}