@@ -2,135 +2,135 @@ error: pointer must be non-null
22 --> tests/ui/invalid_null_ptr_usage.rs:3:59
33 |
44LL | let _slice: &[usize] = std::slice::from_raw_parts(std::ptr::null(), 0);
5- | ^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
5+ | ^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
66 |
77 = note: `#[deny(clippy::invalid_null_ptr_usage)]` on by default
88
99error: pointer must be non-null
1010 --> tests/ui/invalid_null_ptr_usage.rs:4:59
1111 |
1212LL | let _slice: &[usize] = std::slice::from_raw_parts(std::ptr::null_mut(), 0);
13- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
13+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
1414
1515error: pointer must be non-null
1616 --> tests/ui/invalid_null_ptr_usage.rs:6:63
1717 |
1818LL | let _slice: &[usize] = std::slice::from_raw_parts_mut(std::ptr::null_mut(), 0);
19- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
19+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
2020
2121error: pointer must be non-null
2222 --> tests/ui/invalid_null_ptr_usage.rs:8:33
2323 |
2424LL | std::ptr::copy::<usize>(std::ptr::null(), std::ptr::NonNull::dangling().as_ptr(), 0);
25- | ^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
25+ | ^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
2626
2727error: pointer must be non-null
2828 --> tests/ui/invalid_null_ptr_usage.rs:9:73
2929 |
3030LL | std::ptr::copy::<usize>(std::ptr::NonNull::dangling().as_ptr(), std::ptr::null_mut(), 0);
31- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
31+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
3232
3333error: pointer must be non-null
3434 --> tests/ui/invalid_null_ptr_usage.rs:11:48
3535 |
3636LL | std::ptr::copy_nonoverlapping::<usize>(std::ptr::null(), std::ptr::NonNull::dangling().as_ptr(), 0);
37- | ^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
37+ | ^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
3838
3939error: pointer must be non-null
4040 --> tests/ui/invalid_null_ptr_usage.rs:12:88
4141 |
4242LL | std::ptr::copy_nonoverlapping::<usize>(std::ptr::NonNull::dangling().as_ptr(), std::ptr::null_mut(), 0);
43- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
43+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
4444
4545error: pointer must be non-null
4646 --> tests/ui/invalid_null_ptr_usage.rs:17:36
4747 |
4848LL | let _a: A = std::ptr::read(std::ptr::null());
49- | ^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
49+ | ^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
5050
5151error: pointer must be non-null
5252 --> tests/ui/invalid_null_ptr_usage.rs:18:36
5353 |
5454LL | let _a: A = std::ptr::read(std::ptr::null_mut());
55- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
55+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
5656
5757error: pointer must be non-null
5858 --> tests/ui/invalid_null_ptr_usage.rs:20:46
5959 |
6060LL | let _a: A = std::ptr::read_unaligned(std::ptr::null());
61- | ^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
61+ | ^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
6262
6363error: pointer must be non-null
6464 --> tests/ui/invalid_null_ptr_usage.rs:21:46
6565 |
6666LL | let _a: A = std::ptr::read_unaligned(std::ptr::null_mut());
67- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
67+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
6868
6969error: pointer must be non-null
7070 --> tests/ui/invalid_null_ptr_usage.rs:23:45
7171 |
7272LL | let _a: A = std::ptr::read_volatile(std::ptr::null());
73- | ^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
73+ | ^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
7474
7575error: pointer must be non-null
7676 --> tests/ui/invalid_null_ptr_usage.rs:24:45
7777 |
7878LL | let _a: A = std::ptr::read_volatile(std::ptr::null_mut());
79- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
79+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
8080
8181error: pointer must be non-null
8282 --> tests/ui/invalid_null_ptr_usage.rs:26:39
8383 |
8484LL | let _a: A = std::ptr::replace(std::ptr::null_mut(), A);
85- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
85+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
8686
8787error: pointer must be non-null
8888 --> tests/ui/invalid_null_ptr_usage.rs:30:29
8989 |
9090LL | std::ptr::swap::<A>(std::ptr::null_mut(), &mut A);
91- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
91+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
9292
9393error: pointer must be non-null
9494 --> tests/ui/invalid_null_ptr_usage.rs:31:37
9595 |
9696LL | std::ptr::swap::<A>(&mut A, std::ptr::null_mut());
97- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
97+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
9898
9999error: pointer must be non-null
100100 --> tests/ui/invalid_null_ptr_usage.rs:33:44
101101 |
102102LL | std::ptr::swap_nonoverlapping::<A>(std::ptr::null_mut(), &mut A, 0);
103- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
103+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
104104
105105error: pointer must be non-null
106106 --> tests/ui/invalid_null_ptr_usage.rs:34:52
107107 |
108108LL | std::ptr::swap_nonoverlapping::<A>(&mut A, std::ptr::null_mut(), 0);
109- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
109+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
110110
111111error: pointer must be non-null
112112 --> tests/ui/invalid_null_ptr_usage.rs:36:25
113113 |
114114LL | std::ptr::write(std::ptr::null_mut(), A);
115- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
115+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
116116
117117error: pointer must be non-null
118118 --> tests/ui/invalid_null_ptr_usage.rs:38:35
119119 |
120120LL | std::ptr::write_unaligned(std::ptr::null_mut(), A);
121- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
121+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
122122
123123error: pointer must be non-null
124124 --> tests/ui/invalid_null_ptr_usage.rs:40:34
125125 |
126126LL | std::ptr::write_volatile(std::ptr::null_mut(), A);
127- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
127+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
128128
129129error: pointer must be non-null
130130 --> tests/ui/invalid_null_ptr_usage.rs:42:40
131131 |
132132LL | std::ptr::write_bytes::<usize>(std::ptr::null_mut(), 42, 0);
133- | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core ::ptr::NonNull::dangling().as_ptr()`
133+ | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std ::ptr::NonNull::dangling().as_ptr()`
134134
135135error: aborting due to 22 previous errors
136136
0 commit comments