]> git.lizzy.rs Git - rust.git/blob - tests/ui/wf/wf-foreign-fn-decl-ret.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / wf / wf-foreign-fn-decl-ret.rs
1 pub trait Unsatisfied {}
2
3 #[repr(transparent)]
4 pub struct Bar<T: Unsatisfied>(T);
5
6 pub trait Foo {
7     type Assoc;
8 }
9
10 extern "C" {
11     pub fn lint_me() -> <() as Foo>::Assoc;
12     //~^ ERROR: the trait bound `(): Foo` is not satisfied [E0277]
13
14     pub fn lint_me_aswell() -> Bar<u32>;
15     //~^ ERROR: the trait bound `u32: Unsatisfied` is not satisfied [E0277]
16 }
17
18 fn main() {}