Skip to content

Commit

Permalink
Fixed more write literals after master merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevossen5 committed Sep 30, 2020
1 parent 916d236 commit d103fe1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions compiler/rustc_middle/src/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,11 @@ pub trait PrettyPrinter<'tcx>:
p!(write("["));
match movability {
hir::Movability::Movable => {}
hir::Movability::Static => p!(write("static ")),
hir::Movability::Static => p!("static "),
}

if !self.tcx().sess.verbose() {
p!(write("generator"));
p!("generator");
// FIXME(eddyb) should use `def_span`.
if let Some(did) = did.as_local() {
let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
Expand All @@ -664,15 +664,15 @@ pub trait PrettyPrinter<'tcx>:
p!(print_def_path(did, substs));
if substs.as_generator().is_valid() {
// Search for the first inference variable
p!(write(" upvar_tys=("));
p!(" upvar_tys=(");
let mut uninferred_ty =
substs.as_generator().upvar_tys().filter(|ty| ty.is_ty_infer());
if uninferred_ty.next().is_some() {
p!(write("unavailable"));
} else {
self = self.comma_sep(substs.as_generator().upvar_tys())?;
}
p!(write(")"));
p!(")");
}
}

Expand All @@ -693,7 +693,7 @@ pub trait PrettyPrinter<'tcx>:
if let Some(did) = did.as_local() {
let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
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 {
let span = self.tcx().hir().span(hir_id);
p!(write("@{}", self.tcx().sess.source_map().span_to_string(span)));
Expand All @@ -710,20 +710,20 @@ pub trait PrettyPrinter<'tcx>:
if uninferred_ty.next().is_some() {
// If the upvar substs contain an inference variable we haven't
// finished capture analysis.
p!(write(" closure_substs=(unavailable)"));
p!(" closure_substs=(unavailable)");
} else {
p!(write(" closure_kind_ty="), print(substs.as_closure().kind_ty()));
p!(" closure_kind_ty=", print(substs.as_closure().kind_ty()));
p!(
write(" closure_sig_as_fn_ptr_ty="),
" 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())?;
p!(write(")"));
p!(")");
}
}
}
p!(write("]"));
p!("]");
}
ty::Array(ty, sz) => {
p!("[", print(ty), "; ");
Expand Down

0 comments on commit d103fe1

Please sign in to comment.