Skip to content

Commit 498fab3

Browse files
committed
Update comments
1 parent fc6f79e commit 498fab3

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

compiler/rustc_metadata/src/dependency_format.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
229229
// static libraries.
230230
//
231231
// If the crate hasn't been included yet and it's not actually required
232-
// (e.g., it's an allocator) then we skip it here as well.
232+
// (e.g., it's a panic runtime) then we skip it here as well.
233233
for &cnum in tcx.crates(()).iter() {
234234
let src = tcx.used_crate_source(cnum);
235235
if src.dylib.is_none()
@@ -247,8 +247,7 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
247247
// artifact which means that we may need to inject dependencies of some
248248
// form.
249249
//
250-
// Things like allocators and panic runtimes may not have been activated
251-
// quite yet, so do so here.
250+
// Things like panic runtimes may not have been activated quite yet, so do so here.
252251
activate_injected_dep(CStore::from_tcx(tcx).injected_panic_runtime(), &mut ret, &|cnum| {
253252
tcx.is_panic_runtime(cnum)
254253
});
@@ -355,9 +354,9 @@ fn attempt_static(tcx: TyCtxt<'_>, unavailable: &mut Vec<CrateNum>) -> Option<De
355354
);
356355
}
357356

358-
// Our allocator/panic runtime may not have been linked above if it wasn't
359-
// explicitly linked, which is the case for any injected dependency. Handle
360-
// that here and activate them.
357+
// Our panic runtime may not have been linked above if it wasn't explicitly
358+
// linked, which is the case for any injected dependency. Handle that here
359+
// and activate it.
361360
activate_injected_dep(CStore::from_tcx(tcx).injected_panic_runtime(), &mut ret, &|cnum| {
362361
tcx.is_panic_runtime(cnum)
363362
});
@@ -393,8 +392,8 @@ fn activate_injected_dep(
393392
}
394393
}
395394

396-
// After the linkage for a crate has been determined we need to verify that
397-
// there's only going to be one allocator in the output.
395+
/// After the linkage for a crate has been determined we need to verify that
396+
/// there's only going to be one panic runtime in the output.
398397
fn verify_ok(tcx: TyCtxt<'_>, list: &DependencyList) {
399398
let sess = &tcx.sess;
400399
if list.is_empty() {

compiler/rustc_session/src/cstore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub enum CrateDepKind {
4242
/// A dependency that is only used for its macros.
4343
MacrosOnly,
4444
/// A dependency that is always injected into the dependency list and so
45-
/// doesn't need to be linked to an rlib, e.g., the injected allocator.
45+
/// doesn't need to be linked to an rlib, e.g., the injected panic runtime.
4646
Implicit,
4747
/// A dependency that is required by an rlib version of this crate.
4848
/// Ordinary `extern crate`s result in `Explicit` dependencies.

0 commit comments

Comments
 (0)