We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c03c213 commit 18ad5a5Copy full SHA for 18ad5a5
src/test/ui/type-alias-impl-trait/issue-72793.rs
@@ -0,0 +1,27 @@
1
+// build-pass
2
+
3
+// Regression test for #72793.
4
+// FIXME: This still shows ICE with `-Zmir-opt-level=2`.
5
6
+#![feature(type_alias_impl_trait)]
7
8
+trait T { type Item; }
9
10
+type Alias<'a> = impl T<Item = &'a ()>;
11
12
+struct S;
13
+impl<'a> T for &'a S {
14
+ type Item = &'a ();
15
+}
16
17
+fn filter_positive<'a>() -> Alias<'a> {
18
+ &S
19
20
21
+fn with_positive(fun: impl Fn(Alias<'_>)) {
22
+ fun(filter_positive());
23
24
25
+fn main() {
26
+ with_positive(|_| ());
27
0 commit comments