]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-ctypes-73251-1.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / lint / lint-ctypes-73251-1.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 pub trait Foo {
14     type Assoc;
15 }
16
17 impl Foo for u32 {
18     type Assoc = Qux;
19 }
20
21 fn assign() -> Qux { 1 }
22
23 extern "C" {
24     pub fn lint_me() -> <u32 as Foo>::Assoc; //~ ERROR: uses type `impl Baz`
25 }
26
27 fn main() {}