Skip to content

Commit eae7db8

Browse files
committed
tweak wording
1 parent aeba2e7 commit eae7db8

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/stacked_borrows/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ impl<'span, 'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'span, 'history, 'ecx, 'mir
363363
[
364364
(
365365
format!(
366-
"{tag:?} cannot be activated because of protected derived tag {protected_tag:?} which was created here"
366+
"{tag:?} cannot be used for memory access because that would remove protected tag {protected_tag:?}, created here"
367367
),
368368
protected_tag_span,
369369
),

tests/fail/stacked_borrows/aliasing_mut1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a Unique retag at offsets [0x0..0x4]
1111
|
1212
LL | let xraw: *mut i32 = unsafe { mem::transmute(&mut x) };
1313
| ^^^^^^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/aliasing_mut1.rs:LL:CC
1616
|
1717
LL | let xraw: *mut i32 = unsafe { mem::transmute(&mut x) };

tests/fail/stacked_borrows/aliasing_mut2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a Unique retag at offsets [0x0..0x4]
1111
|
1212
LL | let xref = &mut x;
1313
| ^^^^^^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/aliasing_mut2.rs:LL:CC
1616
|
1717
LL | safe_raw(xshr, xraw);

tests/fail/stacked_borrows/aliasing_mut4.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a Unique retag at offsets [0x0..0x4]
1111
|
1212
LL | let xref = &mut x;
1313
| ^^^^^^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/aliasing_mut4.rs:LL:CC
1616
|
1717
LL | safe_raw(xshr, xraw as *mut _);

tests/fail/stacked_borrows/illegal_write6.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
1111
|
1212
LL | let p = x as *mut u32;
1313
| ^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/illegal_write6.rs:LL:CC
1616
|
1717
LL | foo(x, p);

tests/fail/stacked_borrows/invalidate_against_barrier1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
1111
|
1212
LL | let xraw = &mut x as *mut _;
1313
| ^^^^^^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/invalidate_against_barrier1.rs:LL:CC
1616
|
1717
LL | inner(xraw, xref);

tests/fail/stacked_borrows/invalidate_against_barrier2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
1111
|
1212
LL | let xraw = &mut x as *mut _;
1313
| ^^^^^^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/invalidate_against_barrier2.rs:LL:CC
1616
|
1717
LL | inner(xraw, xref);

tests/fail/stacked_borrows/newtype_retagging.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
1111
|
1212
LL | let ptr = Box::into_raw(Box::new(0i32));
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14-
help: <TAG> cannot be activated because of protected derived tag <TAG> which was created here
14+
help: <TAG> cannot be used for memory access because that would remove protected tag <TAG>, created here
1515
--> $DIR/newtype_retagging.rs:LL:CC
1616
|
1717
LL | Newtype(&mut *ptr),

0 commit comments

Comments
 (0)