Skip to content

Commit cdd6336

Browse files
committed
Auto merge of rust-lang#12682 - cuviper:muopb-asm, r=llogiq
The `multiple_unsafe_ops_per_block` test needs `asm!` changelog: none
2 parents 1ba7821 + 245fbee commit cdd6336

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

tests/ui/multiple_unsafe_ops_per_block.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@needs-asm-support
12
//@aux-build:proc_macros.rs
23
#![allow(unused)]
34
#![allow(deref_nullptr)]

tests/ui/multiple_unsafe_ops_per_block.stderr

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this `unsafe` block contains 2 unsafe operations, expected only one
2-
--> tests/ui/multiple_unsafe_ops_per_block.rs:36:5
2+
--> tests/ui/multiple_unsafe_ops_per_block.rs:37:5
33
|
44
LL | / unsafe {
55
LL | | STATIC += 1;
@@ -8,20 +8,20 @@ LL | | }
88
| |_____^
99
|
1010
note: modification of a mutable static occurs here
11-
--> tests/ui/multiple_unsafe_ops_per_block.rs:37:9
11+
--> tests/ui/multiple_unsafe_ops_per_block.rs:38:9
1212
|
1313
LL | STATIC += 1;
1414
| ^^^^^^^^^^^
1515
note: unsafe function call occurs here
16-
--> tests/ui/multiple_unsafe_ops_per_block.rs:38:9
16+
--> tests/ui/multiple_unsafe_ops_per_block.rs:39:9
1717
|
1818
LL | not_very_safe();
1919
| ^^^^^^^^^^^^^^^
2020
= note: `-D clippy::multiple-unsafe-ops-per-block` implied by `-D warnings`
2121
= help: to override `-D warnings` add `#[allow(clippy::multiple_unsafe_ops_per_block)]`
2222

2323
error: this `unsafe` block contains 2 unsafe operations, expected only one
24-
--> tests/ui/multiple_unsafe_ops_per_block.rs:45:5
24+
--> tests/ui/multiple_unsafe_ops_per_block.rs:46:5
2525
|
2626
LL | / unsafe {
2727
LL | | drop(u.u);
@@ -30,18 +30,18 @@ LL | | }
3030
| |_____^
3131
|
3232
note: union field access occurs here
33-
--> tests/ui/multiple_unsafe_ops_per_block.rs:46:14
33+
--> tests/ui/multiple_unsafe_ops_per_block.rs:47:14
3434
|
3535
LL | drop(u.u);
3636
| ^^^
3737
note: raw pointer dereference occurs here
38-
--> tests/ui/multiple_unsafe_ops_per_block.rs:47:9
38+
--> tests/ui/multiple_unsafe_ops_per_block.rs:48:9
3939
|
4040
LL | *raw_ptr();
4141
| ^^^^^^^^^^
4242

4343
error: this `unsafe` block contains 3 unsafe operations, expected only one
44-
--> tests/ui/multiple_unsafe_ops_per_block.rs:52:5
44+
--> tests/ui/multiple_unsafe_ops_per_block.rs:53:5
4545
|
4646
LL | / unsafe {
4747
LL | | asm!("nop");
@@ -51,23 +51,23 @@ LL | | }
5151
| |_____^
5252
|
5353
note: inline assembly used here
54-
--> tests/ui/multiple_unsafe_ops_per_block.rs:53:9
54+
--> tests/ui/multiple_unsafe_ops_per_block.rs:54:9
5555
|
5656
LL | asm!("nop");
5757
| ^^^^^^^^^^^
5858
note: unsafe method call occurs here
59-
--> tests/ui/multiple_unsafe_ops_per_block.rs:54:9
59+
--> tests/ui/multiple_unsafe_ops_per_block.rs:55:9
6060
|
6161
LL | sample.not_very_safe();
6262
| ^^^^^^^^^^^^^^^^^^^^^^
6363
note: modification of a mutable static occurs here
64-
--> tests/ui/multiple_unsafe_ops_per_block.rs:55:9
64+
--> tests/ui/multiple_unsafe_ops_per_block.rs:56:9
6565
|
6666
LL | STATIC = 0;
6767
| ^^^^^^^^^^
6868

6969
error: this `unsafe` block contains 6 unsafe operations, expected only one
70-
--> tests/ui/multiple_unsafe_ops_per_block.rs:61:5
70+
--> tests/ui/multiple_unsafe_ops_per_block.rs:62:5
7171
|
7272
LL | / unsafe {
7373
LL | | drop(u.u);
@@ -79,55 +79,55 @@ LL | | }
7979
| |_____^
8080
|
8181
note: union field access occurs here
82-
--> tests/ui/multiple_unsafe_ops_per_block.rs:62:14
82+
--> tests/ui/multiple_unsafe_ops_per_block.rs:63:14
8383
|
8484
LL | drop(u.u);
8585
| ^^^
8686
note: access of a mutable static occurs here
87-
--> tests/ui/multiple_unsafe_ops_per_block.rs:63:14
87+
--> tests/ui/multiple_unsafe_ops_per_block.rs:64:14
8888
|
8989
LL | drop(STATIC);
9090
| ^^^^^^
9191
note: unsafe method call occurs here
92-
--> tests/ui/multiple_unsafe_ops_per_block.rs:64:9
92+
--> tests/ui/multiple_unsafe_ops_per_block.rs:65:9
9393
|
9494
LL | sample.not_very_safe();
9595
| ^^^^^^^^^^^^^^^^^^^^^^
9696
note: unsafe function call occurs here
97-
--> tests/ui/multiple_unsafe_ops_per_block.rs:65:9
97+
--> tests/ui/multiple_unsafe_ops_per_block.rs:66:9
9898
|
9999
LL | not_very_safe();
100100
| ^^^^^^^^^^^^^^^
101101
note: raw pointer dereference occurs here
102-
--> tests/ui/multiple_unsafe_ops_per_block.rs:66:9
102+
--> tests/ui/multiple_unsafe_ops_per_block.rs:67:9
103103
|
104104
LL | *raw_ptr();
105105
| ^^^^^^^^^^
106106
note: inline assembly used here
107-
--> tests/ui/multiple_unsafe_ops_per_block.rs:67:9
107+
--> tests/ui/multiple_unsafe_ops_per_block.rs:68:9
108108
|
109109
LL | asm!("nop");
110110
| ^^^^^^^^^^^
111111

112112
error: this `unsafe` block contains 2 unsafe operations, expected only one
113-
--> tests/ui/multiple_unsafe_ops_per_block.rs:105:5
113+
--> tests/ui/multiple_unsafe_ops_per_block.rs:106:5
114114
|
115115
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
116116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117117
|
118118
note: unsafe function call occurs here
119-
--> tests/ui/multiple_unsafe_ops_per_block.rs:105:14
119+
--> tests/ui/multiple_unsafe_ops_per_block.rs:106:14
120120
|
121121
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
122122
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123123
note: raw pointer dereference occurs here
124-
--> tests/ui/multiple_unsafe_ops_per_block.rs:105:39
124+
--> tests/ui/multiple_unsafe_ops_per_block.rs:106:39
125125
|
126126
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
127127
| ^^^^^^^^^^^^^^^^^^
128128

129129
error: this `unsafe` block contains 2 unsafe operations, expected only one
130-
--> tests/ui/multiple_unsafe_ops_per_block.rs:123:5
130+
--> tests/ui/multiple_unsafe_ops_per_block.rs:124:5
131131
|
132132
LL | / unsafe {
133133
LL | | x();
@@ -136,18 +136,18 @@ LL | | }
136136
| |_____^
137137
|
138138
note: unsafe function call occurs here
139-
--> tests/ui/multiple_unsafe_ops_per_block.rs:124:9
139+
--> tests/ui/multiple_unsafe_ops_per_block.rs:125:9
140140
|
141141
LL | x();
142142
| ^^^
143143
note: unsafe function call occurs here
144-
--> tests/ui/multiple_unsafe_ops_per_block.rs:125:9
144+
--> tests/ui/multiple_unsafe_ops_per_block.rs:126:9
145145
|
146146
LL | x();
147147
| ^^^
148148

149149
error: this `unsafe` block contains 2 unsafe operations, expected only one
150-
--> tests/ui/multiple_unsafe_ops_per_block.rs:134:9
150+
--> tests/ui/multiple_unsafe_ops_per_block.rs:135:9
151151
|
152152
LL | / unsafe {
153153
LL | | T::X();
@@ -156,18 +156,18 @@ LL | | }
156156
| |_________^
157157
|
158158
note: unsafe function call occurs here
159-
--> tests/ui/multiple_unsafe_ops_per_block.rs:135:13
159+
--> tests/ui/multiple_unsafe_ops_per_block.rs:136:13
160160
|
161161
LL | T::X();
162162
| ^^^^^^
163163
note: unsafe function call occurs here
164-
--> tests/ui/multiple_unsafe_ops_per_block.rs:136:13
164+
--> tests/ui/multiple_unsafe_ops_per_block.rs:137:13
165165
|
166166
LL | T::X();
167167
| ^^^^^^
168168

169169
error: this `unsafe` block contains 2 unsafe operations, expected only one
170-
--> tests/ui/multiple_unsafe_ops_per_block.rs:144:5
170+
--> tests/ui/multiple_unsafe_ops_per_block.rs:145:5
171171
|
172172
LL | / unsafe {
173173
LL | | x.0();
@@ -176,12 +176,12 @@ LL | | }
176176
| |_____^
177177
|
178178
note: unsafe function call occurs here
179-
--> tests/ui/multiple_unsafe_ops_per_block.rs:145:9
179+
--> tests/ui/multiple_unsafe_ops_per_block.rs:146:9
180180
|
181181
LL | x.0();
182182
| ^^^^^
183183
note: unsafe function call occurs here
184-
--> tests/ui/multiple_unsafe_ops_per_block.rs:146:9
184+
--> tests/ui/multiple_unsafe_ops_per_block.rs:147:9
185185
|
186186
LL | x.0();
187187
| ^^^^^

0 commit comments

Comments
 (0)