diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 20:54:03 +1100 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 07:24:52 +1100 | 
| commit | d86a48278f7bcd069a56870a70c6376e77bd4ee5 (patch) | |
| tree | 7b653abdf0eda9cd3568a96299fbfe28a39ee259 /compiler/rustc_builtin_macros/src/concat.rs | |
| parent | 5eccfc388e70d45c98b859af5c14f397ae1c206e (diff) | |
| download | rust-d86a48278f7bcd069a56870a70c6376e77bd4ee5.tar.gz rust-d86a48278f7bcd069a56870a70c6376e77bd4ee5.zip | |
Remove `ExtCtxt` methods that duplicate `DiagCtxt` methods.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/concat.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/concat.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/compiler/rustc_builtin_macros/src/concat.rs b/compiler/rustc_builtin_macros/src/concat.rs index 6b8330bfdaf..dade29593af 100644 --- a/compiler/rustc_builtin_macros/src/concat.rs +++ b/compiler/rustc_builtin_macros/src/concat.rs @@ -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); | 
