about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-01-25 16:02:20 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-02-02 15:40:11 +0000
commit9110911353aaee4980c78bcabcb9e5d2aac4c7dd (patch)
tree43b7ffb28fa48eb5986de141a542d77684c206a9
parent0f6e06b7c0262a6940b5161f3ac507084e7daea6 (diff)
downloadrust-9110911353aaee4980c78bcabcb9e5d2aac4c7dd.tar.gz
rust-9110911353aaee4980c78bcabcb9e5d2aac4c7dd.zip
bless
-rw-r--r--src/test/ui/nll/issue-52113.stderr4
-rw-r--r--src/test/ui/nll/ty-outlives/impl-trait-captures.stderr6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/nll/issue-52113.stderr b/src/test/ui/nll/issue-52113.stderr
index d82affef26d..42ff1866893 100644
--- a/src/test/ui/nll/issue-52113.stderr
+++ b/src/test/ui/nll/issue-52113.stderr
@@ -6,8 +6,8 @@ LL | fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> i
    |                |
    |                lifetime `'a` defined here
 ...
-LL |     x
-   |     ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
+LL |         data.push(value);
+   |         ^^^^^^^^^^^^^^^^ argument requires that `'a` must outlive `'b`
    |
    = help: consider adding the following bound: `'a: 'b`
 
diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
index 96481810e33..42d9f057aaa 100644
--- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
+++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
@@ -2,9 +2,9 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
   --> $DIR/impl-trait-captures.rs:11:5
    |
 LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
-   |                  --     ^^^^^^^^^^^^
-   |                  |
-   |                  hidden type `&ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrAnon(0)) T` captures the anonymous lifetime defined here
+   |                  -- hidden type `&ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrAnon(0)) T` captures the anonymous lifetime defined here
+LL |     x
+   |     ^
    |
 help: to declare that the `impl Trait` captures `ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrAnon(0))`, you can add an explicit `ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrAnon(0))` lifetime bound
    |