diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-16 22:43:26 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-17 23:36:26 +0000 |
| commit | 7662731d75ceb19f6242c61a6812c22809e6adc2 (patch) | |
| tree | b2e9a1484bcbc03864277371129de3fc9b8cd365 | |
| parent | ee430346fe2265fc320c098efe8e1bbcbe0dd54c (diff) | |
| download | rust-7662731d75ceb19f6242c61a6812c22809e6adc2.tar.gz rust-7662731d75ceb19f6242c61a6812c22809e6adc2.zip | |
Fix formatting.
| -rw-r--r-- | compiler/rustc_passes/src/stability.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index a1a900d54b9..40999d622dc 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -231,13 +231,14 @@ fn lookup_const_stability(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ConstSt let mut const_stab = const_stab .map(|const_stab| ConstStability::from_partial(const_stab, const_stability_indirect)); - // If this is a const fn but not annotated with stability markers, see if we can inherit regular stability. + // If this is a const fn but not annotated with stability markers, see if we can inherit + // regular stability. if let Some(fn_sig) = tcx.hir_node_by_def_id(def_id).fn_sig() - && fn_sig.header.is_const() - && const_stab.is_none() - // We only ever inherit unstable features. - && let Some(inherit_regular_stab) = tcx.lookup_stability(def_id) - && inherit_regular_stab.is_unstable() + && fn_sig.header.is_const() + && const_stab.is_none() + // We only ever inherit unstable features. + && let Some(inherit_regular_stab) = tcx.lookup_stability(def_id) + && inherit_regular_stab.is_unstable() { const_stab = Some(ConstStability { // We subject these implicitly-const functions to recursive const stability. |
