forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for ice future has no bound vars.
Fixes rust-lang#112347
- Loading branch information
1 parent
6a5f02b
commit a54988a
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// issue: rust-lang/rust#112347 | ||
// ICE future has no bound vars | ||
//@ edition:2021 | ||
//@ check-pass | ||
|
||
#![feature(type_alias_impl_trait)] | ||
|
||
use std::future::Future; | ||
|
||
type Fut<'a> = impl Future<Output = ()> + 'a; | ||
|
||
fn foo<'a>(_: &()) -> Fut<'_> { | ||
async {} | ||
} | ||
|
||
trait Test { | ||
fn hello(); | ||
} | ||
|
||
impl Test for () | ||
where | ||
for<'a> Fut<'a>: Future<Output = ()>, | ||
{ | ||
fn hello() {} | ||
} | ||
|
||
fn main() { | ||
<()>::hello(); | ||
} |