Practice diagnostic message convention

This commit is contained in:
Hirochika Matsumoto 2021-10-03 15:53:02 +09:00
parent 77f1e504a9
commit 3818981ca1
63 changed files with 167 additions and 168 deletions

View file

@ -516,7 +516,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
});
let unit_obligation = obligation.with(predicate.to_predicate(tcx));
if self.predicate_may_hold(&unit_obligation) {
err.note("this trait is implemented for `()`.");
err.note("this trait is implemented for `()`");
err.note(
"this error might have been caused by changes to \
Rust's type-inference algorithm (see issue #48950 \

View file

@ -623,7 +623,7 @@ fn dump_vtable_entries<'tcx>(
trait_ref: ty::PolyTraitRef<'tcx>,
entries: &[VtblEntry<'tcx>],
) {
let msg = format!("Vtable entries for `{}`: {:#?}", trait_ref, entries);
let msg = format!("vtable entries for `{}`: {:#?}", trait_ref, entries);
tcx.sess.struct_span_err(sp, &msg).emit();
}