diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-16 22:42:55 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-17 23:33:13 +0000 |
| commit | ee430346fe2265fc320c098efe8e1bbcbe0dd54c (patch) | |
| tree | 55af6ed90649b4b33423104e4caa73d205beee44 | |
| parent | 83255f57e09694f68b5df6713de46de7894d469b (diff) | |
| download | rust-ee430346fe2265fc320c098efe8e1bbcbe0dd54c.tar.gz rust-ee430346fe2265fc320c098efe8e1bbcbe0dd54c.zip | |
Correct comments.
| -rw-r--r-- | compiler/rustc_passes/src/stability.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 988025db58b..a1a900d54b9 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -124,7 +124,7 @@ fn inherit_stability(def_kind: DefKind) -> bool { /// If the `-Z force-unstable-if-unmarked` flag is passed then we provide /// a parent stability annotation which indicates that this is private /// with the `rustc_private` feature. This is intended for use when -/// compiling `librustc_*` crates themselves so we can leverage crates.io +/// compiling library and `rustc_*` crates themselves so we can leverage crates.io /// while maintaining the invariant that all sysroot crates are unstable /// by default and are unable to be used. const FORCE_UNSTABLE: Stability = Stability { @@ -248,13 +248,11 @@ fn lookup_const_stability(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ConstSt }); } - // Now that everything is computed, insert it into the table. if let Some(const_stab) = const_stab { return Some(const_stab); } - // `impl const Trait for Type` items forward their const stability to their - // immediate children. + // `impl const Trait for Type` items forward their const stability to their immediate children. // FIXME(const_trait_impl): how is this supposed to interact with `#[rustc_const_stable_indirect]`? // Currently, once that is set, we do not inherit anything from the parent any more. if inherit_const_stability(tcx, def_id) { |
