about summary refs log tree commit diff
path: root/compiler/rustc_ast_passes/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-01 13:35:19 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-02 09:01:35 +1100
commita179a53565b63b7499c3199bae5eff810341b41f (patch)
tree79b8fd76ebea1391d79601489e49fb5e30211d35 /compiler/rustc_ast_passes/src
parent6e9573936f1ac8079c9b0b43306e82269f5be6e7 (diff)
downloadrust-a179a53565b63b7499c3199bae5eff810341b41f.tar.gz
rust-a179a53565b63b7499c3199bae5eff810341b41f.zip
Use `Session::diagnostic` in more places.
Diffstat (limited to 'compiler/rustc_ast_passes/src')
-rw-r--r--compiler/rustc_ast_passes/src/feature_gate.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs
index 80b18b0e775..1cffe22ced8 100644
--- a/compiler/rustc_ast_passes/src/feature_gate.rs
+++ b/compiler/rustc_ast_passes/src/feature_gate.rs
@@ -102,7 +102,7 @@ impl<'a> PostExpansionVisitor<'a> {
             }
             Err(abi::AbiDisabled::Unrecognized) => {
                 if self.sess.opts.pretty.map_or(true, |ppm| ppm.needs_hir()) {
-                    self.sess.parse_sess.span_diagnostic.span_delayed_bug(
+                    self.sess.diagnostic().span_delayed_bug(
                         span,
                         format!(
                             "unrecognized ABI not caught in lowering: {}",
@@ -628,7 +628,7 @@ fn maybe_stage_features(sess: &Session, features: &Features, krate: &ast::Crate)
             if all_stable {
                 err.sugg = Some(attr.span);
             }
-            sess.parse_sess.span_diagnostic.emit_err(err);
+            sess.diagnostic().emit_err(err);
         }
     }
 }