#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait Baz {} impl Baz for () {} type Qux = impl Baz; fn assign() -> Qux {} pub trait Foo { type Assoc: 'static; } impl Foo for () { type Assoc = Qux; } #[repr(transparent)] pub struct A { x: &'static ::Assoc, } extern "C" { pub fn lint_me() -> A<()>; //~ ERROR: uses type `Qux` } fn main() {}