1
Fork 0

Miscellaneous small diagnostics cleanup

This commit is contained in:
Camelid 2021-02-03 21:41:18 -08:00
parent e708cbd91c
commit 253a970c3d
16 changed files with 20 additions and 20 deletions

View file

@ -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(

View file

@ -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(),
),
);

View file

@ -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,
));
}