@@ -20,82 +20,94 @@ LL | let _ = unsafe { std::ptr::NonNull::new_unchecked(std::boxed::Box::
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
2121
2222error: use of `NonNull::new_unchecked` with `Box::into_raw`
23- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:51:17
23+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:52:21
2424 |
25- LL | let _ = unsafe { NonNull2::new_unchecked(Box2::into_raw(one)) };
26- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
25+ LL | let _ = unsafe { NonNull2::new_unchecked(Box2::into_raw(one)) };
26+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
2727
2828error: use of `NonNull::new_unchecked` with `Box::into_raw`
29- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:57:17
29+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:60:21
30+ |
31+ LL | let _ = unsafe { NonNull2::new_unchecked(Box2::into_raw(one)) };
32+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
33+
34+ error: use of `NonNull::new_unchecked` with `Box::into_raw`
35+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:67:17
3036 |
3137LL | let _ = unsafe { NonNull::new_unchecked(Box::into_raw(identity!(one))) };
3238 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
3339
3440error: use of `NonNull::new_unchecked` with `Box::into_raw`
35- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:61 :27
41+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:71 :27
3642 |
3743LL | let _ = identity!(unsafe { NonNull::new_unchecked(Box::into_raw(one)) });
3844 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
3945
4046error: use of `NonNull::new_unchecked` with `Box::into_raw`
41- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:65 :17
47+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:75 :17
4248 |
4349LL | let _ = unsafe { identity!(NonNull::new_unchecked(Box::into_raw(one))) };
4450 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
4551
4652error: use of `NonNull::new_unchecked` with `Box::into_raw`
47- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:69 :17
53+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:79 :17
4854 |
4955LL | let _ = unsafe { NonNull::new_unchecked(identity!(Box::into_raw(one))) };
5056 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
5157
5258error: use of `NonNull::new_unchecked` with `Box::into_raw`
53- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:73 :17
59+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:83 :17
5460 |
5561LL | let _ = unsafe { NonNull::new_unchecked(identity!(Box::into_raw(identity!(one)))) };
5662 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
5763
5864error: use of `NonNull::new_unchecked` with `Box::into_raw`
59- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:77 :17
65+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:87 :17
6066 |
6167LL | let _ = unsafe { NonNull::new_unchecked(Box::into_raw(weird!(one))) };
6268 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(weird!(one)))`
6369
6470error: use of `NonNull::new_unchecked` with `Box::into_raw`
65- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:84 :13
71+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:94 :13
6672 |
6773LL | NonNull::new_unchecked(Box::into_raw(unsafe_identity(one)))
6874 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(unsafe_identity(one)))`
6975
7076error: use of `NonNull::new_unchecked` with `Box::into_raw`
71- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:90 :22
77+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:100 :22
7278 |
7379LL | identity(NonNull::new_unchecked(Box::into_raw(one)))
7480 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
7581
7682error: use of `NonNull::new_unchecked` with `Box::into_raw`
77- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:96 :29
83+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:106 :29
7884 |
7985LL | unsafe_identity(NonNull::new_unchecked(Box::into_raw(one)))
8086 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
8187
8288error: use of `NonNull::new_unchecked` with `Box::into_raw`
83- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:101 :13
89+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:111 :13
8490 |
8591LL | NonNull::new_unchecked(Box::into_raw(Box::new(std::num::NonZeroI32::new_unchecked(1))))
8692 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(Box::new(std::num::NonZeroI32::new_unchecked(1))))`
8793
8894error: use of `NonNull::new_unchecked` with `Box::into_raw`
89- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:107 :13
95+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:117 :13
9096 |
9197LL | NonNull::new_unchecked(Box::into_raw(one))
9298 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
9399
94100error: use of `NonNull::new_unchecked` with `Box::into_raw`
95- --> tests/ui/nonnull_unchecked_on_box_ptr.rs:148:13
101+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:158:13
102+ |
103+ LL | let _ = unsafe { NonNull::new_unchecked(Box::into_raw(one)) };
104+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from(Box::leak(one))`
105+
106+ error: use of `NonNull::new_unchecked` with `Box::into_raw`
107+ --> tests/ui/nonnull_unchecked_on_box_ptr.rs:165:13
96108 |
97109LL | let _ = unsafe { NonNull::new_unchecked(Box::into_raw(one)) };
98110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `NonNull::from_mut(Box::leak(one))`
99111
100- error: aborting due to 16 previous errors
112+ error: aborting due to 18 previous errors
101113
0 commit comments