Fixed more write literals after master merge
This commit is contained in:
parent
916d23614b
commit
d103fe15d1
1 changed files with 11 additions and 11 deletions
|
@ -647,11 +647,11 @@ pub trait PrettyPrinter<'tcx>:
|
||||||
p!(write("["));
|
p!(write("["));
|
||||||
match movability {
|
match movability {
|
||||||
hir::Movability::Movable => {}
|
hir::Movability::Movable => {}
|
||||||
hir::Movability::Static => p!(write("static ")),
|
hir::Movability::Static => p!("static "),
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.tcx().sess.verbose() {
|
if !self.tcx().sess.verbose() {
|
||||||
p!(write("generator"));
|
p!("generator");
|
||||||
// FIXME(eddyb) should use `def_span`.
|
// FIXME(eddyb) should use `def_span`.
|
||||||
if let Some(did) = did.as_local() {
|
if let Some(did) = did.as_local() {
|
||||||
let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
|
let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
|
||||||
|
@ -664,7 +664,7 @@ pub trait PrettyPrinter<'tcx>:
|
||||||
p!(print_def_path(did, substs));
|
p!(print_def_path(did, substs));
|
||||||
if substs.as_generator().is_valid() {
|
if substs.as_generator().is_valid() {
|
||||||
// Search for the first inference variable
|
// Search for the first inference variable
|
||||||
p!(write(" upvar_tys=("));
|
p!(" upvar_tys=(");
|
||||||
let mut uninferred_ty =
|
let mut uninferred_ty =
|
||||||
substs.as_generator().upvar_tys().filter(|ty| ty.is_ty_infer());
|
substs.as_generator().upvar_tys().filter(|ty| ty.is_ty_infer());
|
||||||
if uninferred_ty.next().is_some() {
|
if uninferred_ty.next().is_some() {
|
||||||
|
@ -672,7 +672,7 @@ pub trait PrettyPrinter<'tcx>:
|
||||||
} else {
|
} else {
|
||||||
self = self.comma_sep(substs.as_generator().upvar_tys())?;
|
self = self.comma_sep(substs.as_generator().upvar_tys())?;
|
||||||
}
|
}
|
||||||
p!(write(")"));
|
p!(")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ pub trait PrettyPrinter<'tcx>:
|
||||||
if let Some(did) = did.as_local() {
|
if let Some(did) = did.as_local() {
|
||||||
let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
|
let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
|
||||||
if self.tcx().sess.opts.debugging_opts.span_free_formats {
|
if self.tcx().sess.opts.debugging_opts.span_free_formats {
|
||||||
p!(write("@"), print_def_path(did.to_def_id(), substs));
|
p!("@", print_def_path(did.to_def_id(), substs));
|
||||||
} else {
|
} else {
|
||||||
let span = self.tcx().hir().span(hir_id);
|
let span = self.tcx().hir().span(hir_id);
|
||||||
p!(write("@{}", self.tcx().sess.source_map().span_to_string(span)));
|
p!(write("@{}", self.tcx().sess.source_map().span_to_string(span)));
|
||||||
|
@ -710,20 +710,20 @@ pub trait PrettyPrinter<'tcx>:
|
||||||
if uninferred_ty.next().is_some() {
|
if uninferred_ty.next().is_some() {
|
||||||
// If the upvar substs contain an inference variable we haven't
|
// If the upvar substs contain an inference variable we haven't
|
||||||
// finished capture analysis.
|
// finished capture analysis.
|
||||||
p!(write(" closure_substs=(unavailable)"));
|
p!(" closure_substs=(unavailable)");
|
||||||
} else {
|
} else {
|
||||||
p!(write(" closure_kind_ty="), print(substs.as_closure().kind_ty()));
|
p!(" closure_kind_ty=", print(substs.as_closure().kind_ty()));
|
||||||
p!(
|
p!(
|
||||||
write(" closure_sig_as_fn_ptr_ty="),
|
" closure_sig_as_fn_ptr_ty=",
|
||||||
print(substs.as_closure().sig_as_fn_ptr_ty())
|
print(substs.as_closure().sig_as_fn_ptr_ty())
|
||||||
);
|
);
|
||||||
p!(write(" upvar_tys=("));
|
p!(" upvar_tys=(");
|
||||||
self = self.comma_sep(substs.as_closure().upvar_tys())?;
|
self = self.comma_sep(substs.as_closure().upvar_tys())?;
|
||||||
p!(write(")"));
|
p!(")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p!(write("]"));
|
p!("]");
|
||||||
}
|
}
|
||||||
ty::Array(ty, sz) => {
|
ty::Array(ty, sz) => {
|
||||||
p!("[", print(ty), "; ");
|
p!("[", print(ty), "; ");
|
||||||
|
|
Loading…
Reference in a new issue