reword note

This commit is contained in:
Esteban Küber 2025-08-31 20:42:01 +00:00
parent 7a0319f01d
commit 4973903cd2
19 changed files with 27 additions and 27 deletions

View file

@ -423,7 +423,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
{
err.span_note(
pred,
format!("requirement for `{region_name}` introduced here"),
format!("requirement that the value outlives `{region_name}` introduced here"),
);
break;
}

View file

@ -29,7 +29,7 @@ LL | outlives::<'a>(call_once(c));
LL | }
| - `c` dropped here while still borrowed
|
note: requirement for `'a` introduced here
note: requirement that the value outlives `'a` introduced here
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
|
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@ -80,7 +80,7 @@ LL | outlives::<'a>(call_once(c));
LL | }
| - `c` dropped here while still borrowed
|
note: requirement for `'a` introduced here
note: requirement that the value outlives `'a` introduced here
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
|
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@ -102,7 +102,7 @@ LL | outlives::<'a>(c());
LL | outlives::<'a>(call_once(c));
| ^ move out of `c` occurs here
|
note: requirement for `'a` introduced here
note: requirement that the value outlives `'a` introduced here
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
|
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@ -148,7 +148,7 @@ LL | outlives::<'a>(call_once(c));
LL | }
| - `c` dropped here while still borrowed
|
note: requirement for `'a` introduced here
note: requirement that the value outlives `'a` introduced here
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
|
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@ -196,7 +196,7 @@ LL | T.outlives::<'a>(call_once(c));
LL | }
| - `c` dropped here while still borrowed
|
note: requirement for `'a` introduced here
note: requirement that the value outlives `'a` introduced here
--> $DIR/without-precise-captures-we-are-powerless.rs:49:47
|
LL | fn outlives<'a>(&'a self, _: impl Sized + 'a) {}

View file

@ -28,7 +28,7 @@ LL | want(&String::new(), extend_lt);
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/fn-item-check-type-params.rs:47:33
|
LL | fn want<I, O>(_: I, _: impl Fn(I) -> O) {}
@ -43,7 +43,7 @@ LL | let val = extend_lt(&String::from("blah blah blah"));
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/fn-item-check-type-params.rs:22:21
|
LL | (T, Option<U>): Displayable,

View file

@ -23,7 +23,7 @@ LL | force_send(async_load(&not_static));
LL | }
| - `not_static` dropped here while still borrowed
|
note: requirement for `'1` introduced here
note: requirement that the value outlives `'1` introduced here
--> $DIR/implementation-not-general-enough-ice-133252.rs:16:18
|
LL | fn force_send<T: Send>(_: T) {}

View file

@ -11,7 +11,7 @@ LL | | ));
| |______|
| argument requires that borrow lasts for `'a`
|
note: requirement for `'a` introduced here
note: requirement that the value outlives `'a` introduced here
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
error: aborting due to 1 previous error

View file

@ -14,7 +14,7 @@ note: due to a current limitation of the type system, this implies a `'static` l
|
LL | for<'a> I::Item<'a>: Debug,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/hrtb-implied-1.rs:26:26
|
LL | for<'a> I::Item<'a>: Debug,

View file

@ -32,7 +32,7 @@ fn needs_static() {
//~| NOTE borrowed value does not live long enoug
fn needs_static(_: impl Sized + 'static) {}
//~^ NOTE requirement for `'static` introduced here
//~^ NOTE requirement that the value outlives `'static` introduced here
needs_static(a);
//~^ NOTE argument requires that `x` is borrowed for `'static`
}
@ -80,7 +80,7 @@ fn needs_static_mut() {
//~| NOTE borrowed value does not live long enough
fn needs_static(_: impl Sized + 'static) {}
//~^ NOTE requirement for `'static` introduced here
//~^ NOTE requirement that the value outlives `'static` introduced here
needs_static(a);
//~^ NOTE argument requires that `x` is borrowed for `'static`
}

View file

@ -50,7 +50,7 @@ LL |
LL | }
| - `x` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/migration-note.rs:34:37
|
LL | fn needs_static(_: impl Sized + 'static) {}
@ -131,7 +131,7 @@ LL |
LL | }
| - `x` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/migration-note.rs:82:37
|
LL | fn needs_static(_: impl Sized + 'static) {}

View file

@ -70,7 +70,7 @@ LL | })
LL | }
| - `a` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:13:8
|
LL | F: for<'x> FnOnce(Cell<&'a u32>, Cell<&'x u32>),

View file

@ -14,7 +14,7 @@ LL | z = &local_arr;
LL | }
| - `local_arr` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/propagate-multiple-requirements.rs:4:21
|
LL | fn once<S, T, U, F: FnOnce(S, T) -> U>(f: F, s: S, t: T) -> U {

View file

@ -17,7 +17,7 @@ note: due to a current limitation of the type system, this implies a `'static` l
|
LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/local-outlives-static-via-hrtb.rs:15:53
|
LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
@ -42,7 +42,7 @@ note: due to a current limitation of the type system, this implies a `'static` l
|
LL | for<'a> &'a T: Reference<AssociatedType = &'a ()>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/local-outlives-static-via-hrtb.rs:19:30
|
LL | for<'a> &'a T: Reference<AssociatedType = &'a ()>,

View file

@ -18,7 +18,7 @@ note: due to a current limitation of the type system, this implies a `'static` l
|
LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
| ^^^^^^^^^^^^^^
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
|
LL | fn bad<F: Fn(&()) -> &()>(_: F) {}

View file

@ -18,7 +18,7 @@ note: due to a current limitation of the type system, this implies a `'static` l
|
LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
| ^^^^^^^^^^^^^^
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
|
LL | fn bad<F: Fn(&()) -> &()>(_: F) {}

View file

@ -12,7 +12,7 @@ LL | | });
LL | }
| - `x` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/regions-infer-proc-static-upvar.rs:4:19
|
LL | fn foo<F:FnOnce()+'static>(_p: F) { }

View file

@ -11,7 +11,7 @@ LL | }
LL | }
| - `line` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/regions-pattern-typing-issue-19552.rs:1:21
|
LL | fn assert_static<T: 'static>(_t: T) {}

View file

@ -11,7 +11,7 @@ LL | f(&x);
LL | }
| - `x` dropped here while still borrowed
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/static-lifetime-bound.rs:1:10
|
LL | fn f<'a: 'static>(_: &'a i32) {}

View file

@ -8,7 +8,7 @@ LL | f(x);
LL | }
| - temporary value is freed at the end of this statement
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/static-region-bound.rs:3:8
|
LL | fn f<T:'static>(_: T) {}

View file

@ -7,7 +7,7 @@ LL | let s = foo(&String::from("blah blah blah"));
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/wf-in-where-clause-static.rs:12:17
|
LL | &'static S: Static,

View file

@ -7,7 +7,7 @@ LL | let s = foo(&String::from("blah blah blah"));
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
|
note: requirement for `'static` introduced here
note: requirement that the value outlives `'static` introduced here
--> $DIR/wf-in-where-clause-static.rs:12:17
|
LL | &'static S: Static,