Some comment nits

This commit is contained in:
Oli Scherer 2024-03-11 18:39:23 +00:00
parent 6d573e9e31
commit e7795ed0fe

View File

@ -26,7 +26,7 @@ fn predefine_static(
let attrs = self.tcx.codegen_fn_attrs(def_id); let attrs = self.tcx.codegen_fn_attrs(def_id);
let instance = Instance::mono(self.tcx, def_id); let instance = Instance::mono(self.tcx, def_id);
let DefKind::Static { nested, .. } = self.tcx.def_kind(def_id) else { bug!() }; let DefKind::Static { nested, .. } = self.tcx.def_kind(def_id) else { bug!() };
// Nested statics do not have a type, so pick a random type and let `define_static` figure out // Nested statics do not have a type, so pick a dummy type and let `codegen_static` figure out
// the gcc type from the actual evaluated initializer. // the gcc type from the actual evaluated initializer.
let ty = if nested { let ty = if nested {
self.tcx.types.unit self.tcx.types.unit