Remove ExtCtxt methods that duplicate DiagCtxt methods.

This commit is contained in:
Nicholas Nethercote 2023-12-18 20:54:03 +11:00
parent 5eccfc388e
commit d86a48278f
33 changed files with 155 additions and 180 deletions

View file

@ -33,11 +33,11 @@ pub fn expand_concat(
accumulator.push_str(&b.to_string());
}
Ok(ast::LitKind::CStr(..)) => {
cx.emit_err(errors::ConcatCStrLit { span: e.span });
cx.dcx().emit_err(errors::ConcatCStrLit { span: e.span });
has_errors = true;
}
Ok(ast::LitKind::Byte(..) | ast::LitKind::ByteStr(..)) => {
cx.emit_err(errors::ConcatBytestr { span: e.span });
cx.dcx().emit_err(errors::ConcatBytestr { span: e.span });
has_errors = true;
}
Ok(ast::LitKind::Err) => {
@ -63,7 +63,7 @@ pub fn expand_concat(
}
}
ast::ExprKind::IncludedBytes(..) => {
cx.emit_err(errors::ConcatBytestr { span: e.span });
cx.dcx().emit_err(errors::ConcatBytestr { span: e.span });
}
ast::ExprKind::Err => {
has_errors = true;
@ -75,7 +75,7 @@ pub fn expand_concat(
}
if !missing_literal.is_empty() {
cx.emit_err(errors::ConcatMissingLiteral { spans: missing_literal });
cx.dcx().emit_err(errors::ConcatMissingLiteral { spans: missing_literal });
return DummyResult::any(sp);
} else if has_errors {
return DummyResult::any(sp);