rust-clippy/tests/ui/invalid_ref.stderr

44 lines
1.7 KiB
Text
Raw Normal View History

2017-09-29 02:52:10 +00:00
error: reference to zeroed memory
--> $DIR/invalid_ref.rs:23:24
2017-09-29 02:52:10 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let ref_zero: &T = std::mem::zeroed(); // warning
2017-09-29 02:52:10 +00:00
| ^^^^^^^^^^^^^^^^^^
|
= note: #[deny(clippy::invalid_ref)] on by default
2017-09-29 02:52:10 +00:00
= 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:27:24
2017-09-29 02:52:10 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let ref_zero: &T = core::mem::zeroed(); // warning
2017-09-29 02:52:10 +00:00
| ^^^^^^^^^^^^^^^^^^^
|
= 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:31:24
2017-09-29 02:52:10 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let ref_zero: &T = std::intrinsics::init(); // warning
2017-09-29 02:52:10 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= 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:35:26
2017-09-29 02:52:10 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let ref_uninit: &T = std::mem::uninitialized(); // warning
2017-09-29 02:52:10 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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:39:26
2017-09-29 02:52:10 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let ref_uninit: &T = core::mem::uninitialized(); // warning
2017-09-29 02:52:10 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
error: aborting due to 5 previous errors
2018-01-16 16:06:27 +00:00