We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ab71ab commit 7927f09Copy full SHA for 7927f09
1 file changed
src/tools/miri/tests/pass/issues/issue-miri-2433.rs
@@ -0,0 +1,22 @@
1
+#![feature(type_alias_impl_trait)]
2
+
3
+trait T { type Item; }
4
5
+type Alias<'a> = impl T<Item = &'a ()>;
6
7
+struct S;
8
+impl<'a> T for &'a S {
9
+ type Item = &'a ();
10
+}
11
12
+fn filter_positive<'a>() -> Alias<'a> {
13
+ &S
14
15
16
+fn with_positive(fun: impl Fn(Alias<'_>)) {
17
+ fun(filter_positive());
18
19
20
+fn main() {
21
+ with_positive(|_| ());
22
0 commit comments