2023-01-27 14:09:08 -06:00
|
|
|
error: this `unsafe` block contains 2 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:36:5
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | STATIC += 1;
|
|
|
|
LL | | not_very_safe();
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: modification of a mutable static occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:37:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | STATIC += 1;
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:38:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | not_very_safe();
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
= note: `-D clippy::multiple-unsafe-ops-per-block` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::multiple_unsafe_ops_per_block)]`
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
error: this `unsafe` block contains 2 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:45:5
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | drop(u.u);
|
|
|
|
LL | | *raw_ptr();
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: union field access occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:46:14
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | drop(u.u);
|
|
|
|
| ^^^
|
|
|
|
note: raw pointer dereference occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:47:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | *raw_ptr();
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this `unsafe` block contains 3 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:52:5
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | asm!("nop");
|
|
|
|
LL | | sample.not_very_safe();
|
|
|
|
LL | | STATIC = 0;
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: inline assembly used here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:53:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | asm!("nop");
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
note: unsafe method call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:54:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | sample.not_very_safe();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: modification of a mutable static occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:55:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | STATIC = 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this `unsafe` block contains 6 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:61:5
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | drop(u.u);
|
|
|
|
LL | | drop(STATIC);
|
|
|
|
LL | | sample.not_very_safe();
|
|
|
|
... |
|
|
|
|
LL | | asm!("nop");
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: union field access occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:62:14
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | drop(u.u);
|
|
|
|
| ^^^
|
|
|
|
note: access of a mutable static occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:63:14
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | drop(STATIC);
|
|
|
|
| ^^^^^^
|
|
|
|
note: unsafe method call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:64:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | sample.not_very_safe();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:65:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | not_very_safe();
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
note: raw pointer dereference occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:66:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | *raw_ptr();
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
note: inline assembly used here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:67:9
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | asm!("nop");
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this `unsafe` block contains 2 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:105:5
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:105:14
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: raw pointer dereference occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:105:39
|
2023-01-27 14:09:08 -06:00
|
|
|
|
|
|
|
|
LL | unsafe { char::from_u32_unchecked(*ptr.cast::<u32>()) }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2023-03-10 03:53:50 -06:00
|
|
|
error: this `unsafe` block contains 2 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:123:5
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | x();
|
|
|
|
LL | | x();
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:124:9
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | x();
|
|
|
|
| ^^^
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:125:9
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | x();
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: this `unsafe` block contains 2 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:134:9
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | T::X();
|
|
|
|
LL | | T::X();
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:135:13
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | T::X();
|
|
|
|
| ^^^^^^
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:136:13
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | T::X();
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this `unsafe` block contains 2 unsafe operations, expected only one
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:144:5
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | x.0();
|
|
|
|
LL | | x.0();
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:145:9
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | x.0();
|
|
|
|
| ^^^^^
|
|
|
|
note: unsafe function call occurs here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/multiple_unsafe_ops_per_block.rs:146:9
|
2023-03-10 03:53:50 -06:00
|
|
|
|
|
|
|
|
LL | x.0();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2023-01-27 14:09:08 -06:00
|
|
|
|