This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ pub(crate) fn codegen_const_value<'tcx>(
128
128
ty : Ty < ' tcx > ,
129
129
) -> CValue < ' tcx > {
130
130
let layout = fx. layout_of ( ty) ;
131
- assert ! ( ! layout. is_unsized ( ) , "sized const value" ) ;
131
+ assert ! ( layout. is_sized ( ) , "unsized const value" ) ;
132
132
133
133
if layout. is_zst ( ) {
134
134
return CValue :: by_ref ( crate :: Pointer :: dangling ( layout. align . pref ) , layout) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn codegen_field<'tcx>(
19
19
} ;
20
20
21
21
if let Some ( extra) = extra {
22
- if ! field_layout. is_unsized ( ) {
22
+ if field_layout. is_sized ( ) {
23
23
return simple ( fx) ;
24
24
}
25
25
match field_layout. ty . kind ( ) {
@@ -364,7 +364,7 @@ impl<'tcx> CPlace<'tcx> {
364
364
fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
365
365
layout : TyAndLayout < ' tcx > ,
366
366
) -> CPlace < ' tcx > {
367
- assert ! ( ! layout. is_unsized ( ) ) ;
367
+ assert ! ( layout. is_sized ( ) ) ;
368
368
if layout. size . bytes ( ) == 0 {
369
369
return CPlace {
370
370
inner : CPlaceInner :: Addr ( Pointer :: dangling ( layout. align . pref ) , None ) ,
@@ -825,7 +825,7 @@ impl<'tcx> CPlace<'tcx> {
825
825
fx : & FunctionCx < ' _ , ' _ , ' tcx > ,
826
826
variant : VariantIdx ,
827
827
) -> Self {
828
- assert ! ( ! self . layout( ) . is_unsized ( ) ) ;
828
+ assert ! ( self . layout( ) . is_sized ( ) ) ;
829
829
let layout = self . layout ( ) . for_variant ( fx, variant) ;
830
830
CPlace { inner : self . inner , layout }
831
831
}
You can’t perform that action at this time.
0 commit comments