Bless test

This commit is contained in:
Jack Huey 2022-03-07 16:24:41 -05:00
parent b4ca2c0958
commit 06067d94d8
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,5 @@
error[E0311]: the parameter type `T` may not live long enough
--> $DIR/issue-91139.rs:19:12
--> $DIR/issue-91139.rs:27:12
|
LL | fn foo<T>() {
| - help: consider adding an explicit lifetime bound...: `T: 'a`

View File

@ -1,4 +1,13 @@
// check-fail
// revisions: migrate nll
//[nll]compile-flags: -Z borrowck=mir
// Since we are testing nll (and migration) explicitly as a separate
// revisions, don't worry about the --compare-mode=nll on this test.
// ignore-compare-mode-nll
//[nll] check-pass
//[migrate] check-fail
#![feature(generic_associated_types)]
@ -16,7 +25,7 @@ impl<T> Foo<T> for () {
fn foo<T>() {
let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
//~^ the parameter type `T` may not live long enough
//[migrate]~^ the parameter type `T` may not live long enough
}
pub fn main() {}