Skip to content

Commit fb4d627

Browse files
committed
Add a regression test for issue-71443
1 parent e4fa906 commit fb4d627

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![feature(associated_type_bounds)]
2+
3+
struct Incorrect;
4+
5+
fn hello<F: for<'a> Iterator<Item: 'a>>() {
6+
Incorrect //~ERROR: mismatched types
7+
}
8+
9+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-71443-1.rs:6:5
3+
|
4+
LL | fn hello<F: for<'a> Iterator<Item: 'a>>() {
5+
| - help: try adding a return type: `-> Incorrect`
6+
LL | Incorrect
7+
| ^^^^^^^^^ expected `()`, found struct `Incorrect`
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0308`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// check-pass
2+
3+
#![feature(associated_type_bounds)]
4+
5+
fn hello<'b, F>()
6+
where
7+
for<'a> F: Iterator<Item: 'a> + 'b,
8+
{
9+
}
10+
11+
fn main() {}

0 commit comments

Comments
 (0)