about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-08-07 11:30:24 +0200
committerlcnr <rust@lcnr.de>2025-08-13 14:03:26 +0200
commita95a2ac476ef04ccf8cfabd35e6fcdb9569f053d (patch)
treeeb958dce37792b24ac05e2418894f84de7859d00 /tests
parentd62e8578c5dcf08a4b5766ea63ea921f68c9de99 (diff)
downloadrust-a95a2ac476ef04ccf8cfabd35e6fcdb9569f053d.tar.gz
rust-a95a2ac476ef04ccf8cfabd35e6fcdb9569f053d.zip
rework `add_placeholder_from_predicate_note`
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr6
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr4
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr6
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr4
-rw-r--r--tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr12
-rw-r--r--tests/ui/issues/issue-26217.stderr4
-rw-r--r--tests/ui/nll/local-outlives-static-via-hrtb.stderr8
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr4
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr4
-rw-r--r--tests/ui/nll/type-test-universe.stderr4
-rw-r--r--tests/ui/transmutability/references/reject_lifetime_extension.stderr4
11 files changed, 35 insertions, 25 deletions
diff --git a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
index 4ec4d2138db..5389226f7a7 100644
--- a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
+++ b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
@@ -22,12 +22,6 @@ LL |         force_send(async_load(&not_static));
 ...
 LL |     }
    |     - `not_static` dropped here while still borrowed
-   |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/implementation-not-general-enough-ice-133252.rs:16:18
-   |
-LL | fn force_send<T: Send>(_: T) {}
-   |                  ^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
index 5dfc42bc873..9e925c33e58 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
@@ -10,10 +10,10 @@ LL | }
    | - temporary value is freed at the end of this statement
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/hrtb-implied-1.rs:26:26
+  --> $DIR/hrtb-implied-1.rs:26:5
    |
 LL |     for<'a> I::Item<'a>: Debug,
-   |                          ^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
index 9a1a09b29df..e28b4d7b9ca 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
@@ -15,7 +15,11 @@ LL |     let _next = iter2.next();
    = note: requirement occurs because of a mutable reference to `Eat<&mut I, F>`
    = note: mutable references are invariant over their type parameter
    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-   = note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+  --> $DIR/hrtb-implied-2.rs:31:8
+   |
+LL |     F: FnMut(I::Item<'_>),
+   |        ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
index 77f363ee87d..36197317b95 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
@@ -12,10 +12,10 @@ LL |     trivial_bound(iter);
    |     argument requires that `'1` must outlive `'static`
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/hrtb-implied-3.rs:14:26
+  --> $DIR/hrtb-implied-3.rs:14:5
    |
 LL |     for<'a> I::Item<'a>: Sized,
-   |                          ^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr b/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
index 8919919d04e..8ef77eed5ee 100644
--- a/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
+++ b/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
@@ -30,6 +30,12 @@ LL |     fn test_lifetime<'lt, T: Trait>(_: Foo<&'lt u8>) {}
    |     |                |
    |     |                lifetime `'lt` defined here
    |     requires that `'lt` must outlive `'static`
+   |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+  --> $DIR/normalization-placeholder-leak.rs:19:5
+   |
+LL |     for<'x> T::Ty<'x>: Sized;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: lifetime may not live long enough
   --> $DIR/normalization-placeholder-leak.rs:38:5
@@ -39,6 +45,12 @@ LL |     fn test_alias<'lt, T: AnotherTrait>(_: Foo<T::Ty2::<'lt>>) {}
    |     |             |
    |     |             lifetime `'lt` defined here
    |     requires that `'lt` must outlive `'static`
+   |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+  --> $DIR/normalization-placeholder-leak.rs:19:5
+   |
+LL |     for<'x> T::Ty<'x>: Sized;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/issues/issue-26217.stderr b/tests/ui/issues/issue-26217.stderr
index 0b153ad7490..dd7e645341a 100644
--- a/tests/ui/issues/issue-26217.stderr
+++ b/tests/ui/issues/issue-26217.stderr
@@ -7,10 +7,10 @@ LL |     foo::<&'a i32>();
    |     ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/issue-26217.rs:1:30
+  --> $DIR/issue-26217.rs:1:19
    |
 LL | fn foo<T>() where for<'a> T: 'a {}
-   |                              ^^
+   |                   ^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/nll/local-outlives-static-via-hrtb.stderr b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
index a6b3328b5a2..6aa3fda45e0 100644
--- a/tests/ui/nll/local-outlives-static-via-hrtb.stderr
+++ b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
@@ -13,10 +13,10 @@ LL | }
    | - `local` dropped here while still borrowed
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/local-outlives-static-via-hrtb.rs:15:53
+  --> $DIR/local-outlives-static-via-hrtb.rs:15:42
    |
 LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
-   |                                                     ^^^^^^^^^^^^
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0597]: `local` does not live long enough
   --> $DIR/local-outlives-static-via-hrtb.rs:25:45
@@ -33,10 +33,10 @@ LL | }
    | - `local` dropped here while still borrowed
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/local-outlives-static-via-hrtb.rs:19:20
+  --> $DIR/local-outlives-static-via-hrtb.rs:19:5
    |
 LL |     for<'a> &'a T: Reference<AssociatedType = &'a ()>,
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
index 1d086c658df..8ee45b472ea 100644
--- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
@@ -14,10 +14,10 @@ LL | }
    | - `a` dropped here while still borrowed
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:11
    |
 LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
-   |                      ^^^
+   |           ^^^^^^^^^^^^^^
 
 error: implementation of `Fn` is not general enough
   --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
index 1d086c658df..8ee45b472ea 100644
--- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
@@ -14,10 +14,10 @@ LL | }
    | - `a` dropped here while still borrowed
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:11
    |
 LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
-   |                      ^^^
+   |           ^^^^^^^^^^^^^^
 
 error: implementation of `Fn` is not general enough
   --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
diff --git a/tests/ui/nll/type-test-universe.stderr b/tests/ui/nll/type-test-universe.stderr
index 31e17d64b8c..bea18240c35 100644
--- a/tests/ui/nll/type-test-universe.stderr
+++ b/tests/ui/nll/type-test-universe.stderr
@@ -13,10 +13,10 @@ LL |     outlives_forall::<Value<'a>>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/type-test-universe.rs:6:16
+  --> $DIR/type-test-universe.rs:6:5
    |
 LL |     for<'u> T: 'u,
-   |                ^^
+   |     ^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/transmutability/references/reject_lifetime_extension.stderr b/tests/ui/transmutability/references/reject_lifetime_extension.stderr
index a597041c6ca..459e9a02aaa 100644
--- a/tests/ui/transmutability/references/reject_lifetime_extension.stderr
+++ b/tests/ui/transmutability/references/reject_lifetime_extension.stderr
@@ -68,10 +68,10 @@ LL |         unsafe { extend_hrtb(src) }
    |                  argument requires that `'a` must outlive `'static`
    |
 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/reject_lifetime_extension.rs:85:25
+  --> $DIR/reject_lifetime_extension.rs:85:9
    |
 LL |         for<'b> &'b u8: TransmuteFrom<&'a u8>,
-   |                         ^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 8 previous errors