You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Undefined Behavior: not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
2
+
--> $DIR/arg_inplace_mutate.rs:LL:CC
3
+
|
4
+
LL | unsafe { ptr.write(S(0)) };
5
+
| ^^^^^^^^^^^^^^^ not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
6
+
|
7
+
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
8
+
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
9
+
help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
10
+
--> $DIR/arg_inplace_mutate.rs:LL:CC
11
+
|
12
+
LL | / mir! {
13
+
LL | | let unit: ();
14
+
LL | | {
15
+
LL | | let non_copy = S(42);
16
+
... |
17
+
LL | |
18
+
LL | | }
19
+
| |_____^
20
+
help: <TAG> is this argument
21
+
--> $DIR/arg_inplace_mutate.rs:LL:CC
22
+
|
23
+
LL | unsafe { ptr.write(S(0)) };
24
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
25
+
= note: BACKTRACE (of the first span):
26
+
= note: inside `callee` at $DIR/arg_inplace_mutate.rs:LL:CC
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
33
+
34
+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: Undefined Behavior: write access through <TAG> (root of the allocation) is forbidden
2
+
--> $DIR/arg_inplace_mutate.rs:LL:CC
3
+
|
4
+
LL | unsafe { ptr.write(S(0)) };
5
+
| ^^^^^^^^^^^^^^^ write access through <TAG> (root of the allocation) is forbidden
6
+
|
7
+
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
8
+
= help: the accessed tag <TAG> (root of the allocation) is foreign to the protected tag <TAG> (i.e., it is not a child)
9
+
= help: this foreign write access would cause the protected tag <TAG> to transition from Active to Disabled
10
+
= help: this transition would be a loss of read and write permissions, which is not allowed for protected tags
11
+
help: the accessed tag <TAG> was created here
12
+
--> $DIR/arg_inplace_mutate.rs:LL:CC
13
+
|
14
+
LL | / mir! {
15
+
LL | | let unit: ();
16
+
LL | | {
17
+
LL | | let non_copy = S(42);
18
+
... |
19
+
LL | |
20
+
LL | | }
21
+
| |_____^
22
+
help: the protected tag <TAG> was created here, in the initial state Active
23
+
--> $DIR/arg_inplace_mutate.rs:LL:CC
24
+
|
25
+
LL | unsafe { ptr.write(S(0)) };
26
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
27
+
= note: BACKTRACE (of the first span):
28
+
= note: inside `callee` at $DIR/arg_inplace_mutate.rs:LL:CC
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
35
+
36
+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
0 commit comments