diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-10-28 20:21:31 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-10-28 20:21:31 +0200 |
| commit | 56643ec19e79ae1efba18ec9698dd297b1efaa57 (patch) | |
| tree | 3cce237d73d8c4a6cbd25837443bff6049043200 | |
| parent | 73148733261d1cf7d98c7670a274a8fc12f3c342 (diff) | |
| download | rust-56643ec19e79ae1efba18ec9698dd297b1efaa57.tar.gz rust-56643ec19e79ae1efba18ec9698dd297b1efaa57.zip | |
Remove needless print ctx defs
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 433ac33f1b8..8c76db60e3a 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -53,7 +53,6 @@ macro_rules! p { } macro_rules! define_scoped_cx { ($cx:ident) => { - #[allow(unused_macros)] macro_rules! scoped_cx { () => { $cx @@ -408,8 +407,6 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { def_id: DefId, callers: &mut Vec<DefId>, ) -> Result<bool, PrintError> { - define_scoped_cx!(self); - debug!("try_print_visible_def_path: def_id={:?}", def_id); // If `def_id` is a direct or injected extern crate, return the @@ -1868,8 +1865,6 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> { def_id: DefId, args: &'tcx [GenericArg<'tcx>], ) -> Result<(), PrintError> { - define_scoped_cx!(self); - if args.is_empty() { match self.try_print_trimmed_def_path(def_id)? { true => return Ok(()), @@ -2401,8 +2396,6 @@ impl<'tcx> FmtPrinter<'_, 'tcx> { let _ = write!(cx, "{cont}"); }; - define_scoped_cx!(self); - let possible_names = ('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}"))); let mut available_names = possible_names |
