diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-20 22:14:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-20 22:14:29 +0200 |
| commit | 9e5ace6f43e03b51119738bc8a52affa7ef703be (patch) | |
| tree | 9ee151a37da5dc37e425a5b9e1cba8e552e7638b /src | |
| parent | 7e9ecfae5a5de432696ead26c296247fbe3d9b8d (diff) | |
| parent | 127edbac343433b89e3574d5e61b4b23ed05b165 (diff) | |
Rollup merge of #62000 - JohnTitor:add-test-issue-54189, r=cramertj
Add test for issue-54189 Closes #54189
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/issues/issue-54189.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-54189.stderr | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-54189.rs b/src/test/ui/issues/issue-54189.rs new file mode 100644 index 00000000000..70aecc384ef --- /dev/null +++ b/src/test/ui/issues/issue-54189.rs @@ -0,0 +1,6 @@ +fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } } +//~^ ERROR binding for associated type `Output` references lifetime `'r` + +fn main() { + let f = bug(); +} diff --git a/src/test/ui/issues/issue-54189.stderr b/src/test/ui/issues/issue-54189.stderr new file mode 100644 index 00000000000..4787abd49d1 --- /dev/null +++ b/src/test/ui/issues/issue-54189.stderr @@ -0,0 +1,9 @@ +error[E0582]: binding for associated type `Output` references lifetime `'r`, which does not appear in the trait input types + --> $DIR/issue-54189.rs:1:35 + | +LL | fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } } + | ^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0582`. |
