File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,10 @@ impl Type {
210210 self . layout . or_else ( || {
211211 match self . kind {
212212 TypeKind :: Comp ( ref ci) => ci. layout ( ctx) ,
213- TypeKind :: Array ( inner, length) if length == 0 => Some (
214- Layout :: new ( 0 , ctx. resolve_type ( inner) . layout ( ctx) ?. align ) ,
215- ) ,
213+ TypeKind :: Array ( inner, 0 ) => Some ( Layout :: new (
214+ 0 ,
215+ ctx. resolve_type ( inner) . layout ( ctx) ?. align ,
216+ ) ) ,
216217 // FIXME(emilio): This is a hack for anonymous union templates.
217218 // Use the actual pointer size!
218219 TypeKind :: Pointer ( ..) => Some ( Layout :: new (
Original file line number Diff line number Diff line change @@ -1103,7 +1103,7 @@ options! {
11031103 self . options
11041104 . module_lines
11051105 . entry( module. into( ) . into_boxed_str( ) )
1106- . or_insert_with ( Vec :: new )
1106+ . or_default ( )
11071107 . push( line. into( ) . into_boxed_str( ) ) ;
11081108 self
11091109 }
You can’t perform that action at this time.
0 commit comments