Skip to content

Commit a670897

Browse files
committed
add test
1 parent 4fdc78e commit a670897

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/test/ui/regions/issue-102374.rs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
use std::cell::Cell;
2+
3+
#[rustfmt::skip]
4+
fn f(
5+
f: for<'a, 'b, 'c, 'd, 'e, 'f, 'g,
6+
'h, 'i, 'j, 'k, 'l, 'm, 'n,
7+
'o, 'p, 'q, 'r, 's, 't, 'u,
8+
'v, 'w, 'x, 'y, 'z, 'z0>
9+
fn(Cell<(& i32, &'a i32, &'b i32, &'c i32, &'d i32,
10+
&'e i32, &'f i32, &'g i32, &'h i32, &'i i32,
11+
&'j i32, &'k i32, &'l i32, &'m i32, &'n i32,
12+
&'o i32, &'p i32, &'q i32, &'r i32, &'s i32,
13+
&'t i32, &'u i32, &'v i32, &'w i32, &'x i32,
14+
&'y i32, &'z i32, &'z0 i32)>),
15+
) -> i32 {
16+
f
17+
//~^ ERROR mismatched types
18+
}
19+
20+
fn main() {}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-102374.rs:16:5
3+
|
4+
LL | ) -> i32 {
5+
| --- expected `i32` because of return type
6+
LL | f
7+
| ^ expected `i32`, found fn pointer
8+
|
9+
= note: expected type `i32`
10+
found fn pointer `for<'z1, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z0> fn(Cell<(&'z1 i32, &'a i32, &'b i32, &'c i32, &'d i32, &'e i32, &'f i32, &'g i32, &'h i32, &'i i32, &'j i32, &'k i32, &'l i32, &'m i32, &'n i32, &'o i32, &'p i32, &'q i32, &'r i32, &'s i32, &'t i32, &'u i32, &'v i32, &'w i32, &'x i32, &'y i32, &'z i32, &'z0 i32)>)`
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)