diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-08-01 10:41:11 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-08-03 19:58:00 +1000 |
| commit | 1698c8e322d0cd95aea94b85ef098e5ccfe3c856 (patch) | |
| tree | 343de23d40882a008d8d78d32980476d6c31f203 /compiler/rustc_const_eval/src/util | |
| parent | e7d6a0776b06673b5a6258bd7476f1f39ab86756 (diff) | |
| download | rust-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_const_eval/src/util')
| -rw-r--r-- | compiler/rustc_const_eval/src/util/type_name.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/util/type_name.rs b/compiler/rustc_const_eval/src/util/type_name.rs index 2e8b9ea010e..400ba23ae5f 100644 --- a/compiler/rustc_const_eval/src/util/type_name.rs +++ b/compiler/rustc_const_eval/src/util/type_name.rs @@ -166,7 +166,7 @@ impl Write for AbsolutePathPrinter<'_> { } pub fn type_name<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> String { - let mut printer = AbsolutePathPrinter { tcx, path: String::new() }; - printer.print_type(ty).unwrap(); - printer.path + let mut p = AbsolutePathPrinter { tcx, path: String::new() }; + p.print_type(ty).unwrap(); + p.path } |
