1
Fork 0

rustc_error: make ErrorReported impossible to construct

There are a few places were we have to construct it, though, and a few
places that are more invasive to change. To do this, we create a
constructor with a long obvious name.
This commit is contained in:
mark 2022-01-22 18:49:12 -06:00
parent 461e807801
commit bb8d4307eb
104 changed files with 705 additions and 550 deletions

View file

@ -46,7 +46,7 @@ fn unsafe_derive_on_repr_packed(tcx: TyCtxt<'_>, def_id: LocalDefId) {
does not derive Copy (error E0133)"
.to_string()
};
lint.build(&message).emit()
lint.build(&message).emit();
});
}
@ -110,7 +110,7 @@ impl<'tcx> Visitor<'tcx> for PackedRefChecker<'_, 'tcx> {
reference with a raw pointer and use `read_unaligned`/`write_unaligned` \
(loads and stores via `*p` must be properly aligned even when using raw pointers)"
)
.emit()
.emit();
},
);
}