Diagnostic cleanups
- `emitted_at` isn't used outside the crate. - `code` and `messages` are public fields, so there's no point have trivial getters/setters for them. - `suggestions` is public, so the comment about "functionality on `Diagnostic`" isn't needed.
This commit is contained in:
@@ -2717,7 +2717,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
let (trait_name, trait_verb) =
|
||||
if name == sym::Send { ("`Send`", "sent") } else { ("`Sync`", "shared") };
|
||||
|
||||
err.clear_code();
|
||||
err.code = None;
|
||||
err.primary_message(format!(
|
||||
"{future_or_coroutine} cannot be {trait_verb} between threads safely"
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user