@@ -73,8 +73,8 @@ pub(crate) fn const_alloc_to_llvm<'ll>(
7373
7474 // Generating partially-uninit consts is limited to small numbers of chunks,
7575 // to avoid the cost of generating large complex const expressions.
76- // For example, `[(u32, u8); 1024 * 1024]` contains uninit padding in each element,
77- // and would result in `{ [5 x i8] zeroinitializer, [3 x i8] undef, ...repeat 1M times... }`.
76+ // For example, `[(u32, u8); 1024 * 1024]` contains uninit padding in each element, and
77+ // would result in `{ [5 x i8] zeroinitializer, [3 x i8] undef, ...repeat 1M times... }`.
7878 let max = cx. sess ( ) . opts . unstable_opts . uninit_const_chunk_threshold ;
7979 let allow_uninit_chunks = chunks. clone ( ) . take ( max. saturating_add ( 1 ) ) . count ( ) <= max;
8080
@@ -249,8 +249,8 @@ impl<'ll> CodegenCx<'ll, '_> {
249249 trace ! ( ?instance) ;
250250
251251 let DefKind :: Static { nested, .. } = self . tcx . def_kind ( def_id) else { bug ! ( ) } ;
252- // Nested statics do not have a type, so pick a dummy type and let `codegen_static` figure out
253- // the llvm type from the actual evaluated initializer.
252+ // Nested statics do not have a type, so pick a dummy type and let `codegen_static` figure
253+ // out the llvm type from the actual evaluated initializer.
254254 let llty = if nested {
255255 self . type_i8 ( )
256256 } else {
@@ -320,15 +320,16 @@ impl<'ll> CodegenCx<'ll, '_> {
320320 }
321321
322322 if !def_id. is_local ( ) {
323- let needs_dll_storage_attr = self . use_dll_storage_attrs && !self . tcx . is_foreign_item ( def_id) &&
323+ let needs_dll_storage_attr = self . use_dll_storage_attrs
324+ && !self . tcx . is_foreign_item ( def_id)
324325 // Local definitions can never be imported, so we must not apply
325326 // the DLLImport annotation.
326- !dso_local &&
327+ && !dso_local
327328 // ThinLTO can't handle this workaround in all cases, so we don't
328329 // emit the attrs. Instead we make them unnecessary by disallowing
329330 // dynamic linking when linker plugin based LTO is enabled.
330- !self . tcx . sess . opts . cg . linker_plugin_lto . enabled ( ) &&
331- self . tcx . sess . lto ( ) != Lto :: Thin ;
331+ && !self . tcx . sess . opts . cg . linker_plugin_lto . enabled ( )
332+ && self . tcx . sess . lto ( ) != Lto :: Thin ;
332333
333334 // If this assertion triggers, there's something wrong with commandline
334335 // argument validation.
@@ -551,8 +552,8 @@ impl<'ll> CodegenCx<'ll, '_> {
551552 // `#[used(compiler)]` is explicitly requested. This is to avoid similar breakage
552553 // on other targets, in particular MachO targets have *their* static constructor
553554 // lists broken if `llvm.compiler.used` is emitted rather than `llvm.used`. However,
554- // that check happens when assigning the `CodegenFnAttrFlags` in `rustc_hir_analysis`,
555- // so we don't need to take care of it here.
555+ // that check happens when assigning the `CodegenFnAttrFlags` in
556+ // `rustc_hir_analysis`, so we don't need to take care of it here.
556557 self . add_compiler_used_global ( g) ;
557558 }
558559 if attrs. flags . contains ( CodegenFnAttrFlags :: USED_LINKER ) {
0 commit comments