Closed
Description
This does only error once we actually use foo
.
pub trait Unsatisfied {}
#[repr(transparent)]
pub struct Foo<T: Unsatisfied>(T);
extern "C" {
pub fn foo() -> Foo<u32>;
}
The following errors when we declare foo
pub trait Unsatisfied {}
#[repr(transparent)]
pub struct Foo<T: Unsatisfied>(T);
trait A {
fn test() -> Foo<u32>;
//~^ the trait bound `u32: Unsatisfied` is not satisfied
}
Extern statics are also checked:
pub trait Unsatisfied {}
#[repr(transparent)]
pub struct Foo<T: Unsatisfied>(T);
extern "C" {
static FOO: Foo<u32>;
//~^ the trait bound `u32: Unsatisfied` is not satisfied
}
I expected that we also check the well formedness of function declarations in extern blocks