Skip to content

Commit

Permalink
Add nll revision for issue-92096 test that passes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackh726 committed Jan 16, 2022
1 parent ad57295 commit ea562ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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
| |
| 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
Expand Down
12 changes: 7 additions & 5 deletions src/test/ui/generic-associated-types/issue-92096.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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,
{
Expand Down

0 comments on commit ea562ae

Please sign in to comment.