File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ mod prim_never {}
308
308
///
309
309
/// ```no_run
310
310
/// // Undefined behaviour
311
- /// unsafe { char::from_u32_unchecked(0x110000) };
311
+ /// let _ = unsafe { char::from_u32_unchecked(0x110000) };
312
312
/// ```
313
313
///
314
314
/// USVs are also the exact set of values that may be encoded in UTF-8. Because
Original file line number Diff line number Diff line change @@ -1001,7 +1001,7 @@ fn nonnull_tagged_pointer_with_provenance() {
1001
1001
assert_eq ! ( p. tag( ) , 3 ) ;
1002
1002
assert_eq ! ( unsafe { * p. pointer( ) . as_ptr( ) } , 10 ) ;
1003
1003
1004
- unsafe { Box :: from_raw ( p. pointer ( ) . as_ptr ( ) ) } ;
1004
+ unsafe { drop ( Box :: from_raw ( p. pointer ( ) . as_ptr ( ) ) ) } ;
1005
1005
1006
1006
/// A non-null pointer type which carries several bits of metadata and maintains provenance.
1007
1007
#[ repr( transparent) ]
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ mod prim_never {}
308
308
///
309
309
/// ```no_run
310
310
/// // Undefined behaviour
311
- /// unsafe { char::from_u32_unchecked(0x110000) };
311
+ /// let _ = unsafe { char::from_u32_unchecked(0x110000) };
312
312
/// ```
313
313
///
314
314
/// USVs are also the exact set of values that may be encoded in UTF-8. Because
You can’t perform that action at this time.
0 commit comments