Closed
Description
cc @davidtwco
#![feature(type_alias_impl_trait)]
pub trait Foo {
type Assoc;
}
impl Foo for () {
type Assoc = u32;
}
type Bar = impl Foo;
fn assign() -> Bar {}
extern "C" {
pub fn lint_me() -> <Bar as Foo>::Assoc;
}
Gives the following incorrect warning:
warning: `extern` block uses type `Bar`, which is not FFI-safe
--> src/lib.rs:16:25
|
16 | pub fn lint_me() -> <Bar as Foo>::Assoc;
| ^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
= note: `#[warn(improper_ctypes)]` on by default
= note: opaque types have no C equivalent
warning: 1 warning emitted