1
Fork 0

Rollup merge of #81738 - camelid:misc-small-diag-cleanup, r=lcnr

Miscellaneous small diagnostics cleanup
This commit is contained in:
Jonas Schievink 2021-02-06 17:01:49 +01:00 committed by GitHub
commit 96e843ce6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,
));
}