11error[E0308]: mismatched types
2- --> $DIR/resume-arg-late-bound.rs:15 :5
2+ --> $DIR/resume-arg-late-bound.rs:19 :5
33 |
44LL | test(gen);
55 | ^^^^ lifetime mismatch
66 |
77 = note: expected type `for<'a> Generator<&'a mut bool>`
88 found type `Generator<&mut bool>`
99note: the required lifetime does not necessarily outlive the anonymous lifetime #1 defined here
10- --> $DIR/resume-arg-late-bound.rs:11 :15
10+ --> $DIR/resume-arg-late-bound.rs:15 :15
1111 |
1212LL | let gen = |arg: &mut bool| {
1313 | _______________^
@@ -16,21 +16,21 @@ LL | | *arg = true;
1616LL | | };
1717 | |_____^
1818note: the lifetime requirement is introduced here
19- --> $DIR/resume-arg-late-bound.rs:8 :17
19+ --> $DIR/resume-arg-late-bound.rs:12 :17
2020 |
2121LL | fn test(a: impl for<'a> Generator<&'a mut bool>) {}
2222 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323
2424error[E0308]: mismatched types
25- --> $DIR/resume-arg-late-bound.rs:15 :5
25+ --> $DIR/resume-arg-late-bound.rs:19 :5
2626 |
2727LL | test(gen);
2828 | ^^^^ lifetime mismatch
2929 |
3030 = note: expected type `for<'a> Generator<&'a mut bool>`
3131 found type `Generator<&mut bool>`
3232note: the anonymous lifetime #1 defined here doesn't meet the lifetime requirements
33- --> $DIR/resume-arg-late-bound.rs:11 :15
33+ --> $DIR/resume-arg-late-bound.rs:15 :15
3434 |
3535LL | let gen = |arg: &mut bool| {
3636 | _______________^
@@ -39,7 +39,7 @@ LL | | *arg = true;
3939LL | | };
4040 | |_____^
4141note: the lifetime requirement is introduced here
42- --> $DIR/resume-arg-late-bound.rs:8 :17
42+ --> $DIR/resume-arg-late-bound.rs:12 :17
4343 |
4444LL | fn test(a: impl for<'a> Generator<&'a mut bool>) {}
4545 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments