Skip to content

Commit 27338f2

Browse files
committed
add test for ice future has no bound vars.
Fixes #112347
1 parent bb47695 commit 27338f2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// issue: rust-lang/rust#112347
2+
// ICE future has no bound vars
3+
//@ edition:2021
4+
//@ check-pass
5+
6+
#![feature(type_alias_impl_trait)]
7+
8+
use std::future::Future;
9+
10+
type Fut<'a> = impl Future<Output = ()> + 'a;
11+
12+
fn foo<'a>(_: &()) -> Fut<'_> {
13+
async {}
14+
}
15+
16+
trait Test {
17+
fn hello();
18+
}
19+
20+
impl Test for ()
21+
where
22+
for<'a> Fut<'a>: Future<Output = ()>,
23+
{
24+
fn hello() {}
25+
}
26+
27+
fn main() {
28+
<()>::hello();
29+
}

0 commit comments

Comments
 (0)