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 {}
308308///
309309/// ```no_run
310310/// // Undefined behaviour
311- /// unsafe { char::from_u32_unchecked(0x110000) };
311+ /// let _ = unsafe { char::from_u32_unchecked(0x110000) };
312312/// ```
313313///
314314/// 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() {
10011001 assert_eq ! ( p. tag( ) , 3 ) ;
10021002 assert_eq ! ( unsafe { * p. pointer( ) . as_ptr( ) } , 10 ) ;
10031003
1004- unsafe { Box :: from_raw ( p. pointer ( ) . as_ptr ( ) ) } ;
1004+ unsafe { drop ( Box :: from_raw ( p. pointer ( ) . as_ptr ( ) ) ) } ;
10051005
10061006 /// A non-null pointer type which carries several bits of metadata and maintains provenance.
10071007 #[ repr( transparent) ]
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ mod prim_never {}
308308///
309309/// ```no_run
310310/// // Undefined behaviour
311- /// unsafe { char::from_u32_unchecked(0x110000) };
311+ /// let _ = unsafe { char::from_u32_unchecked(0x110000) };
312312/// ```
313313///
314314/// 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