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 {
|
macro_rules! define_scoped_cx {
|
||||||
($cx:ident) => {
|
($cx:ident) => {
|
||||||
#[allow(unused_macros)]
|
|
||||||
macro_rules! scoped_cx {
|
macro_rules! scoped_cx {
|
||||||
() => {
|
() => {
|
||||||
$cx
|
$cx
|
||||||
@ -408,8 +407,6 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
|
|||||||
def_id: DefId,
|
def_id: DefId,
|
||||||
callers: &mut Vec<DefId>,
|
callers: &mut Vec<DefId>,
|
||||||
) -> Result<bool, PrintError> {
|
) -> Result<bool, PrintError> {
|
||||||
define_scoped_cx!(self);
|
|
||||||
|
|
||||||
debug!("try_print_visible_def_path: def_id={:?}", def_id);
|
debug!("try_print_visible_def_path: def_id={:?}", def_id);
|
||||||
|
|
||||||
// If `def_id` is a direct or injected extern crate, return the
|
// 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,
|
def_id: DefId,
|
||||||
args: &'tcx [GenericArg<'tcx>],
|
args: &'tcx [GenericArg<'tcx>],
|
||||||
) -> Result<(), PrintError> {
|
) -> Result<(), PrintError> {
|
||||||
define_scoped_cx!(self);
|
|
||||||
|
|
||||||
if args.is_empty() {
|
if args.is_empty() {
|
||||||
match self.try_print_trimmed_def_path(def_id)? {
|
match self.try_print_trimmed_def_path(def_id)? {
|
||||||
true => return Ok(()),
|
true => return Ok(()),
|
||||||
@ -2401,8 +2396,6 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
|
|||||||
let _ = write!(cx, "{cont}");
|
let _ = write!(cx, "{cont}");
|
||||||
};
|
};
|
||||||
|
|
||||||
define_scoped_cx!(self);
|
|
||||||
|
|
||||||
let possible_names = ('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}")));
|
let possible_names = ('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}")));
|
||||||
|
|
||||||
let mut available_names = possible_names
|
let mut available_names = possible_names
|
||||||
|
Loading…
x
Reference in New Issue
Block a user