File tree 1 file changed +2
-8
lines changed
compiler/rustc_middle/src/mir/interpret
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,7 @@ pub trait AllocBytes:
42
42
43
43
/// Create a zeroed `AllocBytes` of the specified size and alignment;
44
44
/// call the callback error handler if there is an error in allocating the memory.
45
- fn zeroed (
46
- size : Size ,
47
- _align : Align ,
48
- ) -> Option < Self > ;
45
+ fn zeroed ( size : Size , _align : Align ) -> Option < Self > ;
49
46
}
50
47
51
48
// Default `bytes` for `Allocation` is a `Box<[u8]>`.
@@ -58,10 +55,7 @@ impl AllocBytes for Box<[u8]> {
58
55
Box :: < [ u8 ] > :: from ( slice. into ( ) )
59
56
}
60
57
61
- fn zeroed (
62
- size : Size ,
63
- _align : Align ,
64
- ) -> Option < Self > {
58
+ fn zeroed ( size : Size , _align : Align ) -> Option < Self > {
65
59
let bytes = Box :: < [ u8 ] > :: try_new_zeroed_slice ( size. bytes_usize ( ) ) . ok ( ) ?;
66
60
// SAFETY: the box was zero-allocated, which is a valid initial value for Box<[u8]>
67
61
let bytes = unsafe { bytes. assume_init ( ) } ;
You can’t perform that action at this time.
0 commit comments