about summary refs log tree commit diff
path: root/tests/ui/impl-trait
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-06-26 18:36:37 +0000
committerMichael Goulet <michael@errs.io>2023-06-26 19:14:49 +0000
commit724f3ff50defca08ac1841c08d70d31cbe07ba52 (patch)
tree1f553808e713d17d3ddd7745c102356c451508e6 /tests/ui/impl-trait
parent26cd5486f89d49b18af91d5c44d6f93e55261ba6 (diff)
downloadrust-724f3ff50defca08ac1841c08d70d31cbe07ba52.tar.gz
rust-724f3ff50defca08ac1841c08d70d31cbe07ba52.zip
migrate lifetime too
Diffstat (limited to 'tests/ui/impl-trait')
-rw-r--r--tests/ui/impl-trait/universal_wrong_hrtb.rs2
-rw-r--r--tests/ui/impl-trait/universal_wrong_hrtb.stderr10
2 files changed, 3 insertions, 9 deletions
diff --git a/tests/ui/impl-trait/universal_wrong_hrtb.rs b/tests/ui/impl-trait/universal_wrong_hrtb.rs
index b9551c2ceb0..48561710143 100644
--- a/tests/ui/impl-trait/universal_wrong_hrtb.rs
+++ b/tests/ui/impl-trait/universal_wrong_hrtb.rs
@@ -3,6 +3,6 @@ trait Trait<'a> {
 }
 
 fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {}
-//~^ ERROR `impl Trait` can only mention lifetimes bound at the fn or impl level
+//~^ ERROR `impl Trait` can only mention lifetimes from an fn or impl
 
 fn main() {}
diff --git a/tests/ui/impl-trait/universal_wrong_hrtb.stderr b/tests/ui/impl-trait/universal_wrong_hrtb.stderr
index 37eb8dfa1a1..b5a091b61fa 100644
--- a/tests/ui/impl-trait/universal_wrong_hrtb.stderr
+++ b/tests/ui/impl-trait/universal_wrong_hrtb.stderr
@@ -1,14 +1,8 @@
-error: `impl Trait` can only mention lifetimes bound at the fn or impl level
+error: `impl Trait` can only mention lifetimes from an fn or impl
   --> $DIR/universal_wrong_hrtb.rs:5:73
    |
 LL | fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {}
-   |                                                                         ^^
-   |
-note: lifetime declared here
-  --> $DIR/universal_wrong_hrtb.rs:5:39
-   |
-LL | fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {}
-   |                                       ^^
+   |                                       -- lifetime declared here         ^^
 
 error: aborting due to previous error