about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/cfg.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-18 20:54:03 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-24 07:24:52 +1100
commitd86a48278f7bcd069a56870a70c6376e77bd4ee5 (patch)
tree7b653abdf0eda9cd3568a96299fbfe28a39ee259 /compiler/rustc_builtin_macros/src/cfg.rs
parent5eccfc388e70d45c98b859af5c14f397ae1c206e (diff)
downloadrust-d86a48278f7bcd069a56870a70c6376e77bd4ee5.tar.gz
rust-d86a48278f7bcd069a56870a70c6376e77bd4ee5.zip
Remove `ExtCtxt` methods that duplicate `DiagCtxt` methods.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/cfg.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/cfg.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/cfg.rs b/compiler/rustc_builtin_macros/src/cfg.rs
index 31cac51845f..48be680b619 100644
--- a/compiler/rustc_builtin_macros/src/cfg.rs
+++ b/compiler/rustc_builtin_macros/src/cfg.rs
@@ -39,7 +39,7 @@ fn parse_cfg<'a>(cx: &mut ExtCtxt<'a>, span: Span, tts: TokenStream) -> PResult<
     let mut p = cx.new_parser_from_tts(tts);
 
     if p.token == token::Eof {
-        return Err(cx.create_err(errors::RequiresCfgPattern { span }));
+        return Err(cx.dcx().create_err(errors::RequiresCfgPattern { span }));
     }
 
     let cfg = p.parse_meta_item()?;
@@ -47,7 +47,7 @@ fn parse_cfg<'a>(cx: &mut ExtCtxt<'a>, span: Span, tts: TokenStream) -> PResult<
     let _ = p.eat(&token::Comma);
 
     if !p.eat(&token::Eof) {
-        return Err(cx.create_err(errors::OneCfgPattern { span }));
+        return Err(cx.dcx().create_err(errors::OneCfgPattern { span }));
     }
 
     Ok(cfg)