]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-57611-trait-alias.rs
CommitLineData
dfeec247
XL
1// Regression test for issue #57611
2// Ensures that we don't ICE
3// FIXME: This should compile, but it currently doesn't
064997fb 4// known-bug: unknown
04454e1e 5
dfeec247 6#![feature(trait_alias)]
94222f64 7#![feature(type_alias_impl_trait)]
dfeec247
XL
8
9trait Foo {
10 type Bar: Baz<Self, Self>;
11
12 fn bar(&self) -> Self::Bar;
13}
14
15struct X;
16
17impl Foo for X {
f035d41b 18 type Bar = impl Baz<Self, Self>;
dfeec247
XL
19
20 fn bar(&self) -> Self::Bar {
21 |x| x
22 }
23}
24
1b1a35ee 25trait Baz<A: ?Sized, B: ?Sized> = Fn(&A) -> &B;
dfeec247
XL
26
27fn main() {}