We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 66dff98 + afd8cf2 commit 62d37a4Copy full SHA for 62d37a4
src/test/ui/type-alias-impl-trait/issue-72793.rs
@@ -0,0 +1,25 @@
1
+// check-pass
2
+// compile-flags: -Zmir-opt-level=3
3
+
4
+#![feature(type_alias_impl_trait)]
5
6
+trait T { type Item; }
7
8
+type Alias<'a> = impl T<Item = &'a ()>;
9
10
+struct S;
11
+impl<'a> T for &'a S {
12
+ type Item = &'a ();
13
+}
14
15
+fn filter_positive<'a>() -> Alias<'a> {
16
+ &S
17
18
19
+fn with_positive(fun: impl Fn(Alias<'_>)) {
20
+ fun(filter_positive());
21
22
23
+fn main() {
24
+ with_positive(|_| ());
25
0 commit comments