11error: 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
33 |
44LL | / unsafe {
55LL | | STATIC += 1;
@@ -8,19 +8,19 @@ LL | | }
88 | |_____^
99 |
1010note: 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
1212 |
1313LL | STATIC += 1;
1414 | ^^^^^^^^^^^
1515note: 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
1717 |
1818LL | not_very_safe();
1919 | ^^^^^^^^^^^^^^^
2020 = note: `-D clippy::multiple-unsafe-ops-per-block` implied by `-D warnings`
2121
2222error: 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
2424 |
2525LL | / unsafe {
2626LL | | drop(u.u);
@@ -29,18 +29,18 @@ LL | | }
2929 | |_____^
3030 |
3131note: 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
3333 |
3434LL | drop(u.u);
3535 | ^^^
3636note: 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
3838 |
3939LL | *raw_ptr();
4040 | ^^^^^^^^^^
4141
4242error: 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
4444 |
4545LL | / unsafe {
4646LL | | asm!("nop");
@@ -50,23 +50,23 @@ LL | | }
5050 | |_____^
5151 |
5252note: inline assembly used here
53- --> $DIR/multiple_unsafe_ops_per_block.rs:49 :9
53+ --> $DIR/multiple_unsafe_ops_per_block.rs:53 :9
5454 |
5555LL | asm!("nop");
5656 | ^^^^^^^^^^^
5757note: 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
5959 |
6060LL | sample.not_very_safe();
6161 | ^^^^^^^^^^^^^^^^^^^^^^
6262note: 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
6464 |
6565LL | STATIC = 0;
6666 | ^^^^^^^^^^
6767
6868error: 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
7070 |
7171LL | / unsafe {
7272LL | | drop(u.u);
@@ -78,49 +78,49 @@ LL | | }
7878 | |_____^
7979 |
8080note: 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
8282 |
8383LL | drop(u.u);
8484 | ^^^
8585note: 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
8787 |
8888LL | drop(STATIC);
8989 | ^^^^^^
9090note: 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
9292 |
9393LL | sample.not_very_safe();
9494 | ^^^^^^^^^^^^^^^^^^^^^^
9595note: 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
9797 |
9898LL | not_very_safe();
9999 | ^^^^^^^^^^^^^^^
100100note: 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
102102 |
103103LL | *raw_ptr();
104104 | ^^^^^^^^^^
105105note: inline assembly used here
106- --> $DIR/multiple_unsafe_ops_per_block.rs:63 :9
106+ --> $DIR/multiple_unsafe_ops_per_block.rs:67 :9
107107 |
108108LL | asm!("nop");
109109 | ^^^^^^^^^^^
110110
111111error: 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
113113 |
114114LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
115115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116116 |
117117note: 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
119119 |
120120LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
121121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122122note: 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
124124 |
125125LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
126126 | ^^^^^^^^^^^^^^^^^^
0 commit comments