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.
This commit is contained in:
parent
92b41eeee6
commit
c601ade3ad
5 changed files with 32 additions and 38 deletions
|
@ -2995,11 +2995,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
let sp = self.tcx.def_span(def_id);
|
||||
|
||||
// Special-case this to say "async block" instead of `[static coroutine]`.
|
||||
let kind = tcx.coroutine_kind(def_id).unwrap().descr();
|
||||
let kind = tcx.coroutine_kind(def_id).unwrap();
|
||||
err.span_note(
|
||||
sp,
|
||||
with_forced_trimmed_paths!(format!(
|
||||
"required because it's used within this {kind}",
|
||||
"required because it's used within this {kind:#}",
|
||||
)),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue