diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-09-21 13:25:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-21 13:25:38 +0200 |
| commit | d05c5fecdec41d40ebf04a686b27019326525cb4 (patch) | |
| tree | e0d24dc0aa85091f82979d051aaf6ee1fdae032a /compiler/rustc_errors/src | |
| parent | 9ce64bae9415d0680f89137d705a06629b29fcae (diff) | |
| parent | 9c762b58ba9f46e806f7e07b80ef59b45de87471 (diff) | |
| download | rust-d05c5fecdec41d40ebf04a686b27019326525cb4.tar.gz rust-d05c5fecdec41d40ebf04a686b27019326525cb4.zip | |
Rollup merge of #115936 - oli-obk:inline_const_promotion, r=RalfJung
Prevent promotion of const fn calls in inline consts We don't wanna make that mistake we did for statics and consts worse by letting more code use it. r? ``@RalfJung`` cc https://github.com/rust-lang/rust/issues/76001
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_impls.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index a170e3a8943..4f77f09b26e 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -161,7 +161,7 @@ impl IntoDiagnosticArg for hir::ConstContext { DiagnosticArgValue::Str(Cow::Borrowed(match self { hir::ConstContext::ConstFn => "const_fn", hir::ConstContext::Static(_) => "static", - hir::ConstContext::Const => "const", + hir::ConstContext::Const { .. } => "const", })) } } |
