diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-08-01 23:58:46 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-08-05 19:11:37 +1000 | 
| commit | b0c36dd4c7519d295239b69127ff84f51f14acc3 (patch) | |
| tree | a662848909b84204d889f6793e7ec17c5ece8127 /compiler/rustc_lint/src/context.rs | |
| parent | 566cdab16d74f29837b0978f25159c9ee7c51440 (diff) | |
| download | rust-b0c36dd4c7519d295239b69127ff84f51f14acc3.tar.gz rust-b0c36dd4c7519d295239b69127ff84f51f14acc3.zip | |
Rename most of the printers.
Three of them are named `AbsolutePathPrinter`, which is confusing, so give those names that better indicate how they are used. And then there is `SymbolPrinter` and `SymbolMangler`, which are renamed as `LegacySymbolMangler` and `V0SymbolMangler`, better indicating their similarity.
Diffstat (limited to 'compiler/rustc_lint/src/context.rs')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index 11181d10af5..0dd50af2efc 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -745,12 +745,12 @@ impl<'tcx> LateContext<'tcx> { /// } /// ``` pub fn get_def_path(&self, def_id: DefId) -> Vec<Symbol> { - struct AbsolutePathPrinter<'tcx> { + struct LintPathPrinter<'tcx> { tcx: TyCtxt<'tcx>, path: Vec<Symbol>, } - impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> { + impl<'tcx> Printer<'tcx> for LintPathPrinter<'tcx> { fn tcx(&self) -> TyCtxt<'tcx> { self.tcx } @@ -853,7 +853,7 @@ impl<'tcx> LateContext<'tcx> { } } - let mut p = AbsolutePathPrinter { tcx: self.tcx, path: vec![] }; + let mut p = LintPathPrinter { tcx: self.tcx, path: vec![] }; p.print_def_path(def_id, &[]).unwrap(); p.path } | 
