File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change
1
+ // check-fail
2
+ // known-bug
3
+
1
4
// Regression test for #47511: anonymous lifetimes can appear
2
5
// unconstrained in a return type, but only if they appear just once
3
6
// in the input, as the input to a projection.
4
7
5
8
fn f ( _: X ) -> X {
6
- //~^ ERROR return type references an anonymous lifetime
7
9
unimplemented ! ( )
8
10
}
9
11
10
12
fn g < ' a > ( _: X < ' a > ) -> X < ' a > {
11
- //~^ ERROR return type references lifetime `'a`, which is not constrained
12
13
unimplemented ! ( )
13
14
}
14
15
Original file line number Diff line number Diff line change 1
1
error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
2
- --> $DIR/issue-47511.rs:5 :15
2
+ --> $DIR/issue-47511.rs:8 :15
3
3
|
4
4
LL | fn f(_: X) -> X {
5
5
| ^
6
6
|
7
7
= note: lifetimes appearing in an associated type are not considered constrained
8
8
9
9
error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types
10
- --> $DIR/issue-47511.rs:10 :23
10
+ --> $DIR/issue-47511.rs:12 :23
11
11
|
12
12
LL | fn g<'a>(_: X<'a>) -> X<'a> {
13
13
| ^^^^^
You can’t perform that action at this time.
0 commit comments