Rollup merge of #81738 - camelid:misc-small-diag-cleanup, r=lcnr
Miscellaneous small diagnostics cleanup
This commit is contained in:
commit
96e843ce6a
16 changed files with 20 additions and 20 deletions
|
@ -117,7 +117,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
|
|||
{
|
||||
err.span_help(
|
||||
tcx.def_span(def.did),
|
||||
&format!("try adding a `where` bound using this expression: where [u8; {}]: Sized", snippet),
|
||||
&format!("try adding a `where` bound using this expression: `where [u8; {}]: Sized`", snippet),
|
||||
);
|
||||
} else {
|
||||
err.span_help(
|
||||
|
|
|
@ -1780,7 +1780,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
multispan.push_span_label(
|
||||
sp,
|
||||
format!(
|
||||
"...if indirection was used here: `Box<{}>`",
|
||||
"...if indirection were used here: `Box<{}>`",
|
||||
param.name.ident(),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1103,7 +1103,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
// This is currently not possible to trigger because E0038 takes precedence, but
|
||||
// leave it in for completeness in case anything changes in an earlier stage.
|
||||
err.note(&format!(
|
||||
"if trait `{}` was object safe, you could return a trait object",
|
||||
"if trait `{}` were object-safe, you could return a trait object",
|
||||
trait_obj,
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue