Do not abort compilation if expansion produces errors
Fix a number of uncovered deficiencies in diagnostics
This commit is contained in:
@@ -666,7 +666,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
||||
"X" => "UpperHex",
|
||||
_ => {
|
||||
ecx.span_err(sp, &format!("unknown format trait `{}`", *tyname));
|
||||
"Dummy"
|
||||
return DummyResult::raw_expr(sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -713,7 +713,7 @@ pub fn expand_format_args_nl<'cx>(
|
||||
sp,
|
||||
feature_gate::GateIssue::Language,
|
||||
feature_gate::EXPLAIN_FORMAT_ARGS_NL);
|
||||
return base::DummyResult::expr(sp);
|
||||
return DummyResult::expr(sp);
|
||||
}
|
||||
sp = sp.apply_mark(ecx.current_expansion.mark);
|
||||
match parse_args(ecx, sp, tts) {
|
||||
|
||||
Reference in New Issue
Block a user