]> git.lizzy.rs Git - rust.git/blob - src/test/ui/wf/wf-foreign-fn-decl-ret.rs
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / 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() {}