about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/format.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-21 16:26:09 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-24 08:17:47 +1100
commit8a9db2545919f945ffbb215e4325917e0bfc5b3a (patch)
tree435bcdd5e90f99b23e52f76535996e27c42ccf06 /compiler/rustc_builtin_macros/src/format.rs
parent8af3d8dcabc8970615dd386df7fde13c5794f004 (diff)
downloadrust-8a9db2545919f945ffbb215e4325917e0bfc5b3a.tar.gz
rust-8a9db2545919f945ffbb215e4325917e0bfc5b3a.zip
Remove more `Session` methods that duplicate `DiagCtxt` methods.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/format.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/format.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs
index b896e51ddb3..a668db438eb 100644
--- a/compiler/rustc_builtin_macros/src/format.rs
+++ b/compiler/rustc_builtin_macros/src/format.rs
@@ -529,7 +529,7 @@ fn make_format_args(
 
     // Only check for unused named argument names if there are no other errors to avoid causing
     // too much noise in output errors, such as when a named argument is entirely unused.
-    if invalid_refs.is_empty() && ecx.sess.err_count() == 0 {
+    if invalid_refs.is_empty() && ecx.dcx().err_count() == 0 {
         for &(index, span, used_as) in &numeric_refences_to_named_arg {
             let (position_sp_to_replace, position_sp_for_msg) = match used_as {
                 Placeholder(pspan) => (span, pspan),