]>
git.proxmox.com Git - rustc.git/blob - tests/ui/type-alias-impl-trait/issue-90400-2.rs
1 // Regression test for #90400,
2 // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836
4 #![feature(impl_trait_in_assoc_type)]
17 fn foo
<B
: Bar
>(&self, bar
: B
) -> Self::FooFn
<B
>;
22 type FooFn
<B
> = impl Baz
;
24 fn foo
<B
: Bar
>(&self, bar
: B
) -> Self::FooFn
<B
> {
25 MyBaz(bar
) //~ ERROR: the trait bound `B: Bar` is not satisfied
29 struct MyBaz
<B
: Bar
>(B
);
30 impl<B
: Bar
> Baz
for MyBaz
<B
> {
35 let boom
: <MyFoo
as Foo
>::FooFn
<u32> = unsafe { core::mem::zeroed() }
;