diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 21:14:02 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 07:59:21 +1100 |
| commit | d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7 (patch) | |
| tree | 6a1bd10bfc900bacf504f9b5e5b7b64378d00e04 /compiler/rustc_expand/src | |
| parent | ec9af0d6cb6386c7be6056a71366d275d5ca3e1e (diff) | |
| download | rust-d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7.tar.gz rust-d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7.zip | |
Remove `ParseSess` methods that duplicate `DiagCtxt` methods.
Also add missing `#[track_caller]` attributes to `DiagCtxt` methods as necessary to keep tests working.
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/base.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/expand.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index d66b5f0ad2b..7f0ad7cc309 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -1115,7 +1115,7 @@ impl<'a> ExtCtxt<'a> { pub fn trace_macros_diag(&mut self) { for (span, notes) in self.expansions.iter() { - let mut db = self.sess.parse_sess.create_note(errors::TraceMacro { span: *span }); + let mut db = self.dcx().create_note(errors::TraceMacro { span: *span }); for note in notes { db.note(note.clone()); } diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index ee1212af3f5..44da925e125 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -957,7 +957,7 @@ pub fn ensure_complete_parse<'a>( let expands_to_match_arm = kind_name == "pattern" && parser.token == token::FatArrow; - parser.sess.emit_err(IncompleteParse { + parser.dcx().emit_err(IncompleteParse { span: def_site_span, token, label_span: span, |
