Add nll revision for issue-92096 test that passes

This commit is contained in:
Jack Huey 2022-01-15 23:17:32 -05:00
parent ad57295fc9
commit ea562aeed5
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
error[E0311]: the parameter type `C` may not live long enough
--> $DIR/issue-92096.rs:18:33
--> $DIR/issue-92096.rs:20:33
|
LL | fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
| - ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds
@ -7,7 +7,7 @@ LL | fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
| help: consider adding an explicit lifetime bound...: `C: 'a`
error[E0311]: the parameter type `C` may not live long enough
--> $DIR/issue-92096.rs:18:33
--> $DIR/issue-92096.rs:20:33
|
LL | fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
| - ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds

View File

@ -1,8 +1,10 @@
// edition:2018
// check-fail
// FIXME(generic_associated_types): this should pass, but we end up
// essentially requiring that `for<'s> C: 's`
// [nll] check-pass
// revisions: migrate nll
// Explicitly testing nll with revision, so ignore compare-mode=nll
// ignore-compare-mode-nll
#![cfg_attr(nll, feature(nll))]
#![feature(generic_associated_types)]
use std::future::Future;
@ -16,8 +18,8 @@ trait Client {
}
fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
//~^ ERROR the parameter
//~| ERROR the parameter
//[migrate]~^ ERROR the parameter
//[migrate]~| ERROR the parameter
where
C: Client + Send + Sync,
{