Skip to content

Commit 417542f

Browse files
committed
reword label
1 parent dc630aa commit 417542f

File tree

64 files changed

+121
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+121
-121
lines changed

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
518518
err.span_label(
519519
span,
520520
format!(
521-
"`{name}` is a `{pointer_sigil}` {pointer_desc}, \
522-
so the data it refers to cannot be {acted_on}",
521+
"`{name}` is a `{pointer_sigil}` {pointer_desc}, so it cannot be \
522+
{acted_on}",
523523
),
524524
);
525525

tests/ui/array-slice-vec/slice-mut-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
22
--> $DIR/slice-mut-2.rs:7:18
33
|
44
LL | let _ = &mut x[2..4];
5-
| ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
5+
| ^ `x` is a `&` reference, so it cannot be borrowed as mutable
66
|
77
help: consider changing this binding's type
88
|

tests/ui/borrowck/accidentally-cloning-ref-borrow-error.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0596]: cannot borrow `sm.x` as mutable, as it is behind a `&` reference
22
--> $DIR/accidentally-cloning-ref-borrow-error.rs:32:9
33
|
44
LL | foo(&mut sm.x);
5-
| ^^^^^^^^^ `sm` is a `&` reference, so the data it refers to cannot be borrowed as mutable
5+
| ^^^^^^^^^ `sm` is a `&` reference, so it cannot be borrowed as mutable
66
|
77
help: `Str` doesn't implement `Clone`, so this call clones the reference `&Str`
88
--> $DIR/accidentally-cloning-ref-borrow-error.rs:31:21

tests/ui/borrowck/argument_number_mismatch_ice.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ error[E0594]: cannot assign to `*input`, which is behind a `&` reference
1111
--> $DIR/argument_number_mismatch_ice.rs:10:9
1212
|
1313
LL | *input = self.0;
14-
| ^^^^^^^^^^^^^^^ `input` is a `&` reference, so the data it refers to cannot be written to
14+
| ^^^^^^^^^^^^^^^ `input` is a `&` reference, so it cannot be written to
1515
|
1616
help: consider changing this to be a mutable reference in the `impl` method and the `trait` definition
1717
|

tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
22
--> $DIR/borrow-raw-address-of-deref-mutability.rs:6:13
33
|
44
LL | let q = &raw mut *x;
5-
| ^^^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
5+
| ^^^^^^^^^^^ `x` is a `&` reference, so it cannot be borrowed as mutable
66
|
77
help: consider changing this to be a mutable reference
88
|
@@ -13,7 +13,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer
1313
--> $DIR/borrow-raw-address-of-deref-mutability.rs:12:13
1414
|
1515
LL | let q = &raw mut *x;
16-
| ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable
16+
| ^^^^^^^^^^^ `x` is a `*const` pointer, so it cannot be borrowed as mutable
1717
|
1818
help: consider specifying this binding's type
1919
|

tests/ui/borrowck/borrowck-access-permissions.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ error[E0596]: cannot borrow `*ref_x` as mutable, as it is behind a `&` reference
3333
--> $DIR/borrowck-access-permissions.rs:36:19
3434
|
3535
LL | let _y1 = &mut *ref_x;
36-
| ^^^^^^^^^^^ `ref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
36+
| ^^^^^^^^^^^ `ref_x` is a `&` reference, so it cannot be borrowed as mutable
3737
|
3838
help: consider changing this to be a mutable reference
3939
|
@@ -44,7 +44,7 @@ error[E0596]: cannot borrow `*ptr_x` as mutable, as it is behind a `*const` poin
4444
--> $DIR/borrowck-access-permissions.rs:46:23
4545
|
4646
LL | let _y1 = &mut *ptr_x;
47-
| ^^^^^^^^^^^ `ptr_x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable
47+
| ^^^^^^^^^^^ `ptr_x` is a `*const` pointer, so it cannot be borrowed as mutable
4848
|
4949
help: consider changing this binding's type
5050
|
@@ -56,7 +56,7 @@ error[E0596]: cannot borrow `*foo_ref.f` as mutable, as it is behind a `&` refer
5656
--> $DIR/borrowck-access-permissions.rs:59:18
5757
|
5858
LL | let _y = &mut *foo_ref.f;
59-
| ^^^^^^^^^^^^^^^ `foo_ref` is a `&` reference, so the data it refers to cannot be borrowed as mutable
59+
| ^^^^^^^^^^^^^^^ `foo_ref` is a `&` reference, so it cannot be borrowed as mutable
6060
|
6161
help: consider changing this to be a mutable reference
6262
|

tests/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0594]: cannot assign to `*s.pointer`, which is behind a `&` reference
22
--> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:9:5
33
|
44
LL | *s.pointer += 1;
5-
| ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written to
5+
| ^^^^^^^^^^^^^^^ `s` is a `&` reference, so it cannot be written to
66
|
77
help: consider changing this to be a mutable reference
88
|
@@ -13,7 +13,7 @@ error[E0594]: cannot assign to `*s.pointer`, which is behind a `&` reference
1313
--> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:17:5
1414
|
1515
LL | *s.pointer += 1;
16-
| ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written to
16+
| ^^^^^^^^^^^^^^^ `s` is a `&` reference, so it cannot be written to
1717
|
1818
help: consider changing this to be a mutable reference
1919
|

tests/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0594]: cannot assign to `**t1`, which is behind a `&` reference
22
--> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:9:5
33
|
44
LL | **t1 = 22;
5-
| ^^^^^^^^^ `t1` is a `&` reference, so the data it refers to cannot be written to
5+
| ^^^^^^^^^ `t1` is a `&` reference, so it cannot be written to
66
|
77
help: consider specifying this binding's type
88
|
@@ -23,7 +23,7 @@ error[E0596]: cannot borrow `**t0` as mutable, as it is behind a `&` reference
2323
--> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:19:26
2424
|
2525
LL | let x: &mut isize = &mut **t0;
26-
| ^^^^^^^^^ `t0` is a `&` reference, so the data it refers to cannot be borrowed as mutable
26+
| ^^^^^^^^^ `t0` is a `&` reference, so it cannot be borrowed as mutable
2727
|
2828
help: consider changing this to be a mutable reference
2929
|

tests/ui/borrowck/borrowck-issue-14498.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0594]: cannot assign to `***p`, which is behind a `&` reference
22
--> $DIR/borrowck-issue-14498.rs:16:5
33
|
44
LL | ***p = 2;
5-
| ^^^^^^^^ `p` is a `&` reference, so the data it refers to cannot be written to
5+
| ^^^^^^^^ `p` is a `&` reference, so it cannot be written to
66
|
77
help: consider changing this to be a mutable reference
88
|

tests/ui/borrowck/borrowck-reborrow-from-mut.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ error[E0596]: cannot borrow `foo.bar1` as mutable, as it is behind a `&` referen
106106
--> $DIR/borrowck-reborrow-from-mut.rs:88:17
107107
|
108108
LL | let _bar1 = &mut foo.bar1;
109-
| ^^^^^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be borrowed as mutable
109+
| ^^^^^^^^^^^^^ `foo` is a `&` reference, so it cannot be borrowed as mutable
110110
|
111111
help: consider changing this to be a mutable reference
112112
|

0 commit comments

Comments
 (0)