]> git.lizzy.rs Git - rust.git/blob - tests/ui/invalid_ref.stderr
Merge pull request #2065 from rust-lang-nursery/cargo_clippy
[rust.git] / tests / ui / invalid_ref.stderr
1 warning: running cargo clippy on a crate that also imports the clippy plugin
2
3 error: reference to zeroed memory
4   --> $DIR/invalid_ref.rs:27:24
5    |
6 27 |     let ref_zero: &T = std::mem::zeroed();     // warning
7    |                        ^^^^^^^^^^^^^^^^^^
8    |
9    = note: `-D invalid-ref` implied by `-D warnings`
10    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
11
12 error: reference to zeroed memory
13   --> $DIR/invalid_ref.rs:31:24
14    |
15 31 |     let ref_zero: &T = core::mem::zeroed();   // warning
16    |                        ^^^^^^^^^^^^^^^^^^^
17    |
18    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
19
20 error: reference to zeroed memory
21   --> $DIR/invalid_ref.rs:35:24
22    |
23 35 |     let ref_zero: &T = std::intrinsics::init();   // warning
24    |                        ^^^^^^^^^^^^^^^^^^^^^^^
25    |
26    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
27
28 error: reference to uninitialized memory
29   --> $DIR/invalid_ref.rs:39:26
30    |
31 39 |     let ref_uninit: &T = std::mem::uninitialized();   // warning
32    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
33    |
34    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
35
36 error: reference to uninitialized memory
37   --> $DIR/invalid_ref.rs:43:26
38    |
39 43 |     let ref_uninit: &T = core::mem::uninitialized();   // warning
40    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
41    |
42    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
43
44 error: reference to uninitialized memory
45   --> $DIR/invalid_ref.rs:47:26
46    |
47 47 |     let ref_uninit: &T = std::intrinsics::uninit();   // warning
48    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^
49    |
50    = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
51