mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
51 lines
2.1 KiB
Text
51 lines
2.1 KiB
Text
error: reference to zeroed memory
|
|
--> $DIR/invalid_ref.rs:37:24
|
|
|
|
|
37 | let ref_zero: &T = std::mem::zeroed(); // warning
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(clippy::invalid_ref)] on by default
|
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
|
|
|
error: reference to zeroed memory
|
|
--> $DIR/invalid_ref.rs:41:24
|
|
|
|
|
41 | let ref_zero: &T = core::mem::zeroed(); // warning
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
|
|
|
error: reference to zeroed memory
|
|
--> $DIR/invalid_ref.rs:45:24
|
|
|
|
|
45 | let ref_zero: &T = std::intrinsics::init(); // warning
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
|
|
|
error: reference to uninitialized memory
|
|
--> $DIR/invalid_ref.rs:49:26
|
|
|
|
|
49 | let ref_uninit: &T = std::mem::uninitialized(); // warning
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
|
|
|
error: reference to uninitialized memory
|
|
--> $DIR/invalid_ref.rs:53:26
|
|
|
|
|
53 | let ref_uninit: &T = core::mem::uninitialized(); // warning
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
|
|
|
error: reference to uninitialized memory
|
|
--> $DIR/invalid_ref.rs:57:26
|
|
|
|
|
57 | let ref_uninit: &T = std::intrinsics::uninit(); // warning
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
|
|
|
error: aborting due to 6 previous errors
|
|
|