mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Remove needless print ctx defs
This commit is contained in:
parent
7314873326
commit
56643ec19e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user