diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-25 16:37:21 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-25 16:40:32 +0000 |
| commit | c601ade3ad7e59a31d4b429078034074566fd715 (patch) | |
| tree | 677c92b76763d8015a0bb1ab7adf5cb0bedc9b89 /compiler/rustc_const_eval/src/transform | |
| parent | 92b41eeee6ffef609e2216dd145c88ba0fb14102 (diff) | |
| download | rust-c601ade3ad7e59a31d4b429078034074566fd715.tar.gz rust-c601ade3ad7e59a31d4b429078034074566fd715.zip | |
Refactor away the need for some `descr` methods.
Instead we use `Display` impls and their `alternate` render scheme to decide whether we want backticks or not.
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/ops.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 1258d71d521..40183baccf8 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -372,7 +372,7 @@ impl<'tcx> NonConstOp<'tcx> for Coroutine { ccx: &ConstCx<'_, 'tcx>, span: Span, ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { - let msg = format!("{}s are not allowed in {}s", self.0.descr(), ccx.const_kind()); + let msg = format!("{:#}s are not allowed in {}s", self.0, ccx.const_kind()); if let hir::CoroutineKind::Async(hir::CoroutineSource::Block) = self.0 { ccx.tcx.sess.create_feature_err( errors::UnallowedOpInConstContext { span, msg }, |
