rustc_errors: let DiagnosticBuilder::emit
return a "guarantee of emission".
This commit is contained in:
parent
0b9d70cf6d
commit
b7e95dee65
83 changed files with 842 additions and 471 deletions
|
@ -2095,7 +2095,7 @@ fn check_invalid_crate_level_attr(tcx: TyCtxt<'_>, attrs: &[Attribute]) {
|
|||
rustc_errors::Applicability::MachineApplicable,
|
||||
);
|
||||
}
|
||||
err.emit()
|
||||
err.emit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,7 +219,9 @@ impl<'tcx> CheckConstVisitor<'tcx> {
|
|||
required_gates.iter().copied().filter(|&g| !features.enabled(g)).collect();
|
||||
|
||||
match missing_gates.as_slice() {
|
||||
[] => struct_span_err!(tcx.sess, span, E0744, "{}", msg).emit(),
|
||||
[] => {
|
||||
struct_span_err!(tcx.sess, span, E0744, "{}", msg).emit();
|
||||
}
|
||||
|
||||
[missing_primary, ref missing_secondary @ ..] => {
|
||||
let mut err = feature_err(&tcx.sess.parse_sess, *missing_primary, span, &msg);
|
||||
|
|
|
@ -118,7 +118,7 @@ impl<'tcx> ExprVisitor<'tcx> {
|
|||
err.note(&format!("source type: `{}` ({})", from, skeleton_string(from, sk_from)))
|
||||
.note(&format!("target type: `{}` ({})", to, skeleton_string(to, sk_to)));
|
||||
}
|
||||
err.emit()
|
||||
err.emit();
|
||||
}
|
||||
|
||||
fn is_thin_ptr_ty(&self, ty: Ty<'tcx>) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue