1
1
error: this `unsafe` block contains 2 unsafe operations, expected only one
2
- --> tests/ui/multiple_unsafe_ops_per_block.rs:37 :5
2
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:38 :5
3
3
|
4
4
LL | / unsafe {
5
5
LL | | STATIC += 1;
@@ -8,20 +8,20 @@ LL | | }
8
8
| |_____^
9
9
|
10
10
note: modification of a mutable static occurs here
11
- --> tests/ui/multiple_unsafe_ops_per_block.rs:38 :9
11
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:39 :9
12
12
|
13
13
LL | STATIC += 1;
14
14
| ^^^^^^^^^^^
15
15
note: unsafe function call occurs here
16
- --> tests/ui/multiple_unsafe_ops_per_block.rs:39 :9
16
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:40 :9
17
17
|
18
18
LL | not_very_safe();
19
19
| ^^^^^^^^^^^^^^^
20
20
= note: `-D clippy::multiple-unsafe-ops-per-block` implied by `-D warnings`
21
21
= help: to override `-D warnings` add `#[allow(clippy::multiple_unsafe_ops_per_block)]`
22
22
23
23
error: this `unsafe` block contains 2 unsafe operations, expected only one
24
- --> tests/ui/multiple_unsafe_ops_per_block.rs:46 :5
24
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:47 :5
25
25
|
26
26
LL | / unsafe {
27
27
LL | | drop(u.u);
@@ -30,18 +30,18 @@ LL | | }
30
30
| |_____^
31
31
|
32
32
note: union field access occurs here
33
- --> tests/ui/multiple_unsafe_ops_per_block.rs:47 :14
33
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:48 :14
34
34
|
35
35
LL | drop(u.u);
36
36
| ^^^
37
37
note: raw pointer dereference occurs here
38
- --> tests/ui/multiple_unsafe_ops_per_block.rs:48 :9
38
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:49 :9
39
39
|
40
40
LL | *raw_ptr();
41
41
| ^^^^^^^^^^
42
42
43
43
error: this `unsafe` block contains 3 unsafe operations, expected only one
44
- --> tests/ui/multiple_unsafe_ops_per_block.rs:53 :5
44
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:54 :5
45
45
|
46
46
LL | / unsafe {
47
47
LL | | asm!("nop");
@@ -51,23 +51,23 @@ LL | | }
51
51
| |_____^
52
52
|
53
53
note: inline assembly used here
54
- --> tests/ui/multiple_unsafe_ops_per_block.rs:54 :9
54
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:55 :9
55
55
|
56
56
LL | asm!("nop");
57
57
| ^^^^^^^^^^^
58
58
note: unsafe method call occurs here
59
- --> tests/ui/multiple_unsafe_ops_per_block.rs:55 :9
59
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:56 :9
60
60
|
61
61
LL | sample.not_very_safe();
62
62
| ^^^^^^^^^^^^^^^^^^^^^^
63
63
note: modification of a mutable static occurs here
64
- --> tests/ui/multiple_unsafe_ops_per_block.rs:56 :9
64
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:57 :9
65
65
|
66
66
LL | STATIC = 0;
67
67
| ^^^^^^^^^^
68
68
69
69
error: this `unsafe` block contains 6 unsafe operations, expected only one
70
- --> tests/ui/multiple_unsafe_ops_per_block.rs:62 :5
70
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:63 :5
71
71
|
72
72
LL | / unsafe {
73
73
LL | | drop(u.u);
@@ -79,55 +79,55 @@ LL | | }
79
79
| |_____^
80
80
|
81
81
note: union field access occurs here
82
- --> tests/ui/multiple_unsafe_ops_per_block.rs:63 :14
82
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:64 :14
83
83
|
84
84
LL | drop(u.u);
85
85
| ^^^
86
86
note: access of a mutable static occurs here
87
- --> tests/ui/multiple_unsafe_ops_per_block.rs:64 :14
87
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:65 :14
88
88
|
89
89
LL | drop(STATIC);
90
90
| ^^^^^^
91
91
note: unsafe method call occurs here
92
- --> tests/ui/multiple_unsafe_ops_per_block.rs:65 :9
92
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:66 :9
93
93
|
94
94
LL | sample.not_very_safe();
95
95
| ^^^^^^^^^^^^^^^^^^^^^^
96
96
note: unsafe function call occurs here
97
- --> tests/ui/multiple_unsafe_ops_per_block.rs:66 :9
97
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:67 :9
98
98
|
99
99
LL | not_very_safe();
100
100
| ^^^^^^^^^^^^^^^
101
101
note: raw pointer dereference occurs here
102
- --> tests/ui/multiple_unsafe_ops_per_block.rs:67 :9
102
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:68 :9
103
103
|
104
104
LL | *raw_ptr();
105
105
| ^^^^^^^^^^
106
106
note: inline assembly used here
107
- --> tests/ui/multiple_unsafe_ops_per_block.rs:68 :9
107
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:69 :9
108
108
|
109
109
LL | asm!("nop");
110
110
| ^^^^^^^^^^^
111
111
112
112
error: this `unsafe` block contains 2 unsafe operations, expected only one
113
- --> tests/ui/multiple_unsafe_ops_per_block.rs:106 :5
113
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:107 :5
114
114
|
115
115
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
116
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
117
|
118
118
note: unsafe function call occurs here
119
- --> tests/ui/multiple_unsafe_ops_per_block.rs:106 :14
119
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:107 :14
120
120
|
121
121
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
122
122
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123
123
note: raw pointer dereference occurs here
124
- --> tests/ui/multiple_unsafe_ops_per_block.rs:106 :39
124
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:107 :39
125
125
|
126
126
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
127
127
| ^^^^^^^^^^^^^^^^^^
128
128
129
129
error: this `unsafe` block contains 2 unsafe operations, expected only one
130
- --> tests/ui/multiple_unsafe_ops_per_block.rs:124 :5
130
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:125 :5
131
131
|
132
132
LL | / unsafe {
133
133
LL | | x();
@@ -136,18 +136,18 @@ LL | | }
136
136
| |_____^
137
137
|
138
138
note: unsafe function call occurs here
139
- --> tests/ui/multiple_unsafe_ops_per_block.rs:125 :9
139
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:126 :9
140
140
|
141
141
LL | x();
142
142
| ^^^
143
143
note: unsafe function call occurs here
144
- --> tests/ui/multiple_unsafe_ops_per_block.rs:126 :9
144
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:127 :9
145
145
|
146
146
LL | x();
147
147
| ^^^
148
148
149
149
error: this `unsafe` block contains 2 unsafe operations, expected only one
150
- --> tests/ui/multiple_unsafe_ops_per_block.rs:135 :9
150
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:136 :9
151
151
|
152
152
LL | / unsafe {
153
153
LL | | T::X();
@@ -156,18 +156,18 @@ LL | | }
156
156
| |_________^
157
157
|
158
158
note: unsafe function call occurs here
159
- --> tests/ui/multiple_unsafe_ops_per_block.rs:136 :13
159
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:137 :13
160
160
|
161
161
LL | T::X();
162
162
| ^^^^^^
163
163
note: unsafe function call occurs here
164
- --> tests/ui/multiple_unsafe_ops_per_block.rs:137 :13
164
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:138 :13
165
165
|
166
166
LL | T::X();
167
167
| ^^^^^^
168
168
169
169
error: this `unsafe` block contains 2 unsafe operations, expected only one
170
- --> tests/ui/multiple_unsafe_ops_per_block.rs:145 :5
170
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:146 :5
171
171
|
172
172
LL | / unsafe {
173
173
LL | | x.0();
@@ -176,12 +176,12 @@ LL | | }
176
176
| |_____^
177
177
|
178
178
note: unsafe function call occurs here
179
- --> tests/ui/multiple_unsafe_ops_per_block.rs:146 :9
179
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:147 :9
180
180
|
181
181
LL | x.0();
182
182
| ^^^^^
183
183
note: unsafe function call occurs here
184
- --> tests/ui/multiple_unsafe_ops_per_block.rs:147 :9
184
+ --> tests/ui/multiple_unsafe_ops_per_block.rs:148 :9
185
185
|
186
186
LL | x.0();
187
187
| ^^^^^
0 commit comments