Skip to content

Commit 8a763f6

Browse files
committed
Some comment nits
1 parent bbedde8 commit 8a763f6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_codegen_gcc/src/mono_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl<'gcc, 'tcx> PreDefineMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
2626
let attrs = self.tcx.codegen_fn_attrs(def_id);
2727
let instance = Instance::mono(self.tcx, def_id);
2828
let DefKind::Static { nested, .. } = self.tcx.def_kind(def_id) else { bug!() };
29-
// Nested statics do not have a type, so pick a random type and let `define_static` figure out
29+
// Nested statics do not have a type, so pick a dummy type and let `codegen_static` figure out
3030
// the gcc type from the actual evaluated initializer.
3131
let ty = if nested {
3232
self.tcx.types.unit

compiler/rustc_codegen_llvm/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl<'ll> CodegenCx<'ll, '_> {
232232
trace!(?instance);
233233

234234
let DefKind::Static { nested, .. } = self.tcx.def_kind(def_id) else { bug!() };
235-
// Nested statics do not have a type, so pick a random type and let `define_static` figure out
235+
// Nested statics do not have a type, so pick a dummy type and let `codegen_static` figure out
236236
// the llvm type from the actual evaluated initializer.
237237
let llty = if nested {
238238
self.type_i8()

compiler/rustc_codegen_llvm/src/mono_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<'tcx> PreDefineMethods<'tcx> for CodegenCx<'_, 'tcx> {
2424
) {
2525
let instance = Instance::mono(self.tcx, def_id);
2626
let DefKind::Static { nested, .. } = self.tcx.def_kind(def_id) else { bug!() };
27-
// Nested statics do not have a type, so pick a random type and let `define_static` figure out
27+
// Nested statics do not have a type, so pick a dummy type and let `codegen_static` figure out
2828
// the llvm type from the actual evaluated initializer.
2929
let ty = if nested {
3030
self.tcx.types.unit

compiler/rustc_hir/src/def.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl DefKind {
251251
| DefKind::TyParam
252252
| DefKind::ExternCrate => DefPathData::TypeNs(name),
253253
// It's not exactly an anon const, but wrt DefPathData, there
254-
// is not difference.
254+
// is no difference.
255255
DefKind::Static { nested: true, .. } => DefPathData::AnonConst,
256256
DefKind::Fn
257257
| DefKind::Const

0 commit comments

Comments
 (0)