about summary refs log tree commit diff
path: root/compiler/rustc_lint
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-08-01 10:41:11 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-08-03 19:58:00 +1000
commit1698c8e322d0cd95aea94b85ef098e5ccfe3c856 (patch)
tree343de23d40882a008d8d78d32980476d6c31f203 /compiler/rustc_lint
parente7d6a0776b06673b5a6258bd7476f1f39ab86756 (diff)
downloadrust-1698c8e322d0cd95aea94b85ef098e5ccfe3c856.tar.gz
rust-1698c8e322d0cd95aea94b85ef098e5ccfe3c856.zip
Rename `Printer` variables.
Currently they are mostly named `cx`, which is a terrible name for a
type that impls `Printer`/`PrettyPrinter`, and is easy to confuse with
other types like `TyCtxt`. This commit changes them to `p`. A couple of
existing `p` variables had to be renamed to make way.
Diffstat (limited to 'compiler/rustc_lint')
-rw-r--r--compiler/rustc_lint/src/context.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index 70feb49d0dd..7e35d4d142b 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -854,9 +854,9 @@ impl<'tcx> LateContext<'tcx> {
             }
         }
 
-        let mut printer = AbsolutePathPrinter { tcx: self.tcx, path: vec![] };
-        printer.print_def_path(def_id, &[]).unwrap();
-        printer.path
+        let mut p = AbsolutePathPrinter { tcx: self.tcx, path: vec![] };
+        p.print_def_path(def_id, &[]).unwrap();
+        p.path
     }
 
     /// Returns the associated type `name` for `self_ty` as an implementation of `trait_id`.