diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-03-05 04:46:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-05 04:46:40 +0100 |
| commit | 38e3b32dfae34b06eaa20418e2191faf1bcb8b45 (patch) | |
| tree | dcca58107b1fc4cc47570fb10be312c8d176cda3 | |
| parent | e558040908815fe9a3855a14101f667ae3e8bb8f (diff) | |
| parent | 9e03d7ddbe46492ea9487dd52b3c4024a5823099 (diff) | |
| download | rust-38e3b32dfae34b06eaa20418e2191faf1bcb8b45.tar.gz rust-38e3b32dfae34b06eaa20418e2191faf1bcb8b45.zip | |
Rollup merge of #94626 - marmeladema:issue-47511-known-bug, r=jackh726
Add known-bug directive to issue #47511 test case
| -rw-r--r-- | src/test/ui/issues/issue-47511.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-47511.stderr | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/test/ui/issues/issue-47511.rs b/src/test/ui/issues/issue-47511.rs index 0f33b52577b..98c141b6c6a 100644 --- a/src/test/ui/issues/issue-47511.rs +++ b/src/test/ui/issues/issue-47511.rs @@ -1,14 +1,15 @@ +// check-fail +// known-bug + // Regression test for #47511: anonymous lifetimes can appear // unconstrained in a return type, but only if they appear just once // in the input, as the input to a projection. fn f(_: X) -> X { - //~^ ERROR return type references an anonymous lifetime unimplemented!() } fn g<'a>(_: X<'a>) -> X<'a> { - //~^ ERROR return type references lifetime `'a`, which is not constrained unimplemented!() } diff --git a/src/test/ui/issues/issue-47511.stderr b/src/test/ui/issues/issue-47511.stderr index 4473c0e68cf..5b84f7ed62c 100644 --- a/src/test/ui/issues/issue-47511.stderr +++ b/src/test/ui/issues/issue-47511.stderr @@ -1,5 +1,5 @@ error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types - --> $DIR/issue-47511.rs:5:15 + --> $DIR/issue-47511.rs:8:15 | LL | fn f(_: X) -> X { | ^ @@ -7,7 +7,7 @@ LL | fn f(_: X) -> X { = note: lifetimes appearing in an associated type are not considered constrained error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types - --> $DIR/issue-47511.rs:10:23 + --> $DIR/issue-47511.rs:12:23 | LL | fn g<'a>(_: X<'a>) -> X<'a> { | ^^^^^ |
