Skip to content

Commit 4973903

Browse files
committed
reword note
1 parent 7a0319f commit 4973903

19 files changed

+27
-27
lines changed

compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
423423
{
424424
err.span_note(
425425
pred,
426-
format!("requirement for `{region_name}` introduced here"),
426+
format!("requirement that the value outlives `{region_name}` introduced here"),
427427
);
428428
break;
429429
}

tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LL | outlives::<'a>(call_once(c));
2929
LL | }
3030
| - `c` dropped here while still borrowed
3131
|
32-
note: requirement for `'a` introduced here
32+
note: requirement that the value outlives `'a` introduced here
3333
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
3434
|
3535
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -80,7 +80,7 @@ LL | outlives::<'a>(call_once(c));
8080
LL | }
8181
| - `c` dropped here while still borrowed
8282
|
83-
note: requirement for `'a` introduced here
83+
note: requirement that the value outlives `'a` introduced here
8484
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
8585
|
8686
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -102,7 +102,7 @@ LL | outlives::<'a>(c());
102102
LL | outlives::<'a>(call_once(c));
103103
| ^ move out of `c` occurs here
104104
|
105-
note: requirement for `'a` introduced here
105+
note: requirement that the value outlives `'a` introduced here
106106
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
107107
|
108108
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -148,7 +148,7 @@ LL | outlives::<'a>(call_once(c));
148148
LL | }
149149
| - `c` dropped here while still borrowed
150150
|
151-
note: requirement for `'a` introduced here
151+
note: requirement that the value outlives `'a` introduced here
152152
--> $DIR/without-precise-captures-we-are-powerless.rs:7:33
153153
|
154154
LL | fn outlives<'a>(_: impl Sized + 'a) {}
@@ -196,7 +196,7 @@ LL | T.outlives::<'a>(call_once(c));
196196
LL | }
197197
| - `c` dropped here while still borrowed
198198
|
199-
note: requirement for `'a` introduced here
199+
note: requirement that the value outlives `'a` introduced here
200200
--> $DIR/without-precise-captures-we-are-powerless.rs:49:47
201201
|
202202
LL | fn outlives<'a>(&'a self, _: impl Sized + 'a) {}

tests/ui/borrowck/fn-item-check-type-params.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LL | want(&String::new(), extend_lt);
2828
| | creates a temporary value which is freed while still in use
2929
| argument requires that borrow lasts for `'static`
3030
|
31-
note: requirement for `'static` introduced here
31+
note: requirement that the value outlives `'static` introduced here
3232
--> $DIR/fn-item-check-type-params.rs:47:33
3333
|
3434
LL | fn want<I, O>(_: I, _: impl Fn(I) -> O) {}
@@ -43,7 +43,7 @@ LL | let val = extend_lt(&String::from("blah blah blah"));
4343
| | creates a temporary value which is freed while still in use
4444
| argument requires that borrow lasts for `'static`
4545
|
46-
note: requirement for `'static` introduced here
46+
note: requirement that the value outlives `'static` introduced here
4747
--> $DIR/fn-item-check-type-params.rs:22:21
4848
|
4949
LL | (T, Option<U>): Displayable,

tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LL | force_send(async_load(&not_static));
2323
LL | }
2424
| - `not_static` dropped here while still borrowed
2525
|
26-
note: requirement for `'1` introduced here
26+
note: requirement that the value outlives `'1` introduced here
2727
--> $DIR/implementation-not-general-enough-ice-133252.rs:16:18
2828
|
2929
LL | fn force_send<T: Send>(_: T) {}

tests/ui/borrowck/issue-17545.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | | ));
1111
| |______|
1212
| argument requires that borrow lasts for `'a`
1313
|
14-
note: requirement for `'a` introduced here
14+
note: requirement that the value outlives `'a` introduced here
1515
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
1616

1717
error: aborting due to 1 previous error

tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ note: due to a current limitation of the type system, this implies a `'static` l
1414
|
1515
LL | for<'a> I::Item<'a>: Debug,
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
17-
note: requirement for `'static` introduced here
17+
note: requirement that the value outlives `'static` introduced here
1818
--> $DIR/hrtb-implied-1.rs:26:26
1919
|
2020
LL | for<'a> I::Item<'a>: Debug,

tests/ui/impl-trait/precise-capturing/migration-note.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn needs_static() {
3232
//~| NOTE borrowed value does not live long enoug
3333

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

8282
fn needs_static(_: impl Sized + 'static) {}
83-
//~^ NOTE requirement for `'static` introduced here
83+
//~^ NOTE requirement that the value outlives `'static` introduced here
8484
needs_static(a);
8585
//~^ NOTE argument requires that `x` is borrowed for `'static`
8686
}

tests/ui/impl-trait/precise-capturing/migration-note.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ LL |
5050
LL | }
5151
| - `x` dropped here while still borrowed
5252
|
53-
note: requirement for `'static` introduced here
53+
note: requirement that the value outlives `'static` introduced here
5454
--> $DIR/migration-note.rs:34:37
5555
|
5656
LL | fn needs_static(_: impl Sized + 'static) {}
@@ -131,7 +131,7 @@ LL |
131131
LL | }
132132
| - `x` dropped here while still borrowed
133133
|
134-
note: requirement for `'static` introduced here
134+
note: requirement that the value outlives `'static` introduced here
135135
--> $DIR/migration-note.rs:82:37
136136
|
137137
LL | fn needs_static(_: impl Sized + 'static) {}

tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ LL | })
7070
LL | }
7171
| - `a` dropped here while still borrowed
7272
|
73-
note: requirement for `'static` introduced here
73+
note: requirement that the value outlives `'static` introduced here
7474
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:13:8
7575
|
7676
LL | F: for<'x> FnOnce(Cell<&'a u32>, Cell<&'x u32>),

tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | z = &local_arr;
1414
LL | }
1515
| - `local_arr` dropped here while still borrowed
1616
|
17-
note: requirement for `'static` introduced here
17+
note: requirement that the value outlives `'static` introduced here
1818
--> $DIR/propagate-multiple-requirements.rs:4:21
1919
|
2020
LL | fn once<S, T, U, F: FnOnce(S, T) -> U>(f: F, s: S, t: T) -> U {

0 commit comments

Comments
 (0)