Skip to content

Commit b4ca2c0

Browse files
committed
Bless issue-91130 test
1 parent e5f22ff commit b4ca2c0

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/test/ui/generic-associated-types/issue-91139.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
// check-fail
22

33
#![feature(generic_associated_types)]
44

@@ -16,6 +16,7 @@ impl<T> Foo<T> for () {
1616

1717
fn foo<T>() {
1818
let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
19+
//~^ the parameter type `T` may not live long enough
1920
}
2021

2122
pub fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error[E0311]: the parameter type `T` may not live long enough
2+
--> $DIR/issue-91139.rs:19:12
3+
|
4+
LL | fn foo<T>() {
5+
| - help: consider adding an explicit lifetime bound...: `T: 'a`
6+
LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)