1
1
error: this `unsafe` block contains 2 unsafe operations, expected only one
2
- --> $DIR/multiple_unsafe_ops_per_block.rs:32 :5
2
+ --> $DIR/multiple_unsafe_ops_per_block.rs:36 :5
3
3
|
4
4
LL | / unsafe {
5
5
LL | | STATIC += 1;
@@ -8,19 +8,19 @@ LL | | }
8
8
| |_____^
9
9
|
10
10
note: modification of a mutable static occurs here
11
- --> $DIR/multiple_unsafe_ops_per_block.rs:33 :9
11
+ --> $DIR/multiple_unsafe_ops_per_block.rs:37 :9
12
12
|
13
13
LL | STATIC += 1;
14
14
| ^^^^^^^^^^^
15
15
note: unsafe function call occurs here
16
- --> $DIR/multiple_unsafe_ops_per_block.rs:34 :9
16
+ --> $DIR/multiple_unsafe_ops_per_block.rs:38 :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
22
22
error: this `unsafe` block contains 2 unsafe operations, expected only one
23
- --> $DIR/multiple_unsafe_ops_per_block.rs:41 :5
23
+ --> $DIR/multiple_unsafe_ops_per_block.rs:45 :5
24
24
|
25
25
LL | / unsafe {
26
26
LL | | drop(u.u);
@@ -29,18 +29,18 @@ LL | | }
29
29
| |_____^
30
30
|
31
31
note: union field access occurs here
32
- --> $DIR/multiple_unsafe_ops_per_block.rs:42 :14
32
+ --> $DIR/multiple_unsafe_ops_per_block.rs:46 :14
33
33
|
34
34
LL | drop(u.u);
35
35
| ^^^
36
36
note: raw pointer dereference occurs here
37
- --> $DIR/multiple_unsafe_ops_per_block.rs:43 :9
37
+ --> $DIR/multiple_unsafe_ops_per_block.rs:47 :9
38
38
|
39
39
LL | *raw_ptr();
40
40
| ^^^^^^^^^^
41
41
42
42
error: this `unsafe` block contains 3 unsafe operations, expected only one
43
- --> $DIR/multiple_unsafe_ops_per_block.rs:48 :5
43
+ --> $DIR/multiple_unsafe_ops_per_block.rs:52 :5
44
44
|
45
45
LL | / unsafe {
46
46
LL | | asm!("nop");
@@ -50,23 +50,23 @@ LL | | }
50
50
| |_____^
51
51
|
52
52
note: inline assembly used here
53
- --> $DIR/multiple_unsafe_ops_per_block.rs:49 :9
53
+ --> $DIR/multiple_unsafe_ops_per_block.rs:53 :9
54
54
|
55
55
LL | asm!("nop");
56
56
| ^^^^^^^^^^^
57
57
note: unsafe method call occurs here
58
- --> $DIR/multiple_unsafe_ops_per_block.rs:50 :9
58
+ --> $DIR/multiple_unsafe_ops_per_block.rs:54 :9
59
59
|
60
60
LL | sample.not_very_safe();
61
61
| ^^^^^^^^^^^^^^^^^^^^^^
62
62
note: modification of a mutable static occurs here
63
- --> $DIR/multiple_unsafe_ops_per_block.rs:51 :9
63
+ --> $DIR/multiple_unsafe_ops_per_block.rs:55 :9
64
64
|
65
65
LL | STATIC = 0;
66
66
| ^^^^^^^^^^
67
67
68
68
error: this `unsafe` block contains 6 unsafe operations, expected only one
69
- --> $DIR/multiple_unsafe_ops_per_block.rs:57 :5
69
+ --> $DIR/multiple_unsafe_ops_per_block.rs:61 :5
70
70
|
71
71
LL | / unsafe {
72
72
LL | | drop(u.u);
@@ -78,49 +78,49 @@ LL | | }
78
78
| |_____^
79
79
|
80
80
note: union field access occurs here
81
- --> $DIR/multiple_unsafe_ops_per_block.rs:58 :14
81
+ --> $DIR/multiple_unsafe_ops_per_block.rs:62 :14
82
82
|
83
83
LL | drop(u.u);
84
84
| ^^^
85
85
note: access of a mutable static occurs here
86
- --> $DIR/multiple_unsafe_ops_per_block.rs:59 :14
86
+ --> $DIR/multiple_unsafe_ops_per_block.rs:63 :14
87
87
|
88
88
LL | drop(STATIC);
89
89
| ^^^^^^
90
90
note: unsafe method call occurs here
91
- --> $DIR/multiple_unsafe_ops_per_block.rs:60 :9
91
+ --> $DIR/multiple_unsafe_ops_per_block.rs:64 :9
92
92
|
93
93
LL | sample.not_very_safe();
94
94
| ^^^^^^^^^^^^^^^^^^^^^^
95
95
note: unsafe function call occurs here
96
- --> $DIR/multiple_unsafe_ops_per_block.rs:61 :9
96
+ --> $DIR/multiple_unsafe_ops_per_block.rs:65 :9
97
97
|
98
98
LL | not_very_safe();
99
99
| ^^^^^^^^^^^^^^^
100
100
note: raw pointer dereference occurs here
101
- --> $DIR/multiple_unsafe_ops_per_block.rs:62 :9
101
+ --> $DIR/multiple_unsafe_ops_per_block.rs:66 :9
102
102
|
103
103
LL | *raw_ptr();
104
104
| ^^^^^^^^^^
105
105
note: inline assembly used here
106
- --> $DIR/multiple_unsafe_ops_per_block.rs:63 :9
106
+ --> $DIR/multiple_unsafe_ops_per_block.rs:67 :9
107
107
|
108
108
LL | asm!("nop");
109
109
| ^^^^^^^^^^^
110
110
111
111
error: this `unsafe` block contains 2 unsafe operations, expected only one
112
- --> $DIR/multiple_unsafe_ops_per_block.rs:101 :5
112
+ --> $DIR/multiple_unsafe_ops_per_block.rs:105 :5
113
113
|
114
114
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
115
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
116
|
117
117
note: unsafe function call occurs here
118
- --> $DIR/multiple_unsafe_ops_per_block.rs:101 :14
118
+ --> $DIR/multiple_unsafe_ops_per_block.rs:105 :14
119
119
|
120
120
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
121
121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122
122
note: raw pointer dereference occurs here
123
- --> $DIR/multiple_unsafe_ops_per_block.rs:101 :39
123
+ --> $DIR/multiple_unsafe_ops_per_block.rs:105 :39
124
124
|
125
125
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
126
126
| ^^^^^^^^^^^^^^^^^^
0 commit comments