fixed merge conflicts
This commit is contained in:
parent
f69a88b7d3
commit
5032674065
@ -646,13 +646,8 @@ pub trait PrettyPrinter<'tcx>:
|
|||||||
ty::Generator(did, substs, movability) => {
|
ty::Generator(did, substs, movability) => {
|
||||||
p!(write("["));
|
p!(write("["));
|
||||||
match movability {
|
match movability {
|
||||||
<<<<<<< HEAD
|
|
||||||
hir::Movability::Movable => {}
|
hir::Movability::Movable => {}
|
||||||
hir::Movability::Static => p!("static "),
|
hir::Movability::Static => p!("static "),
|
||||||
=======
|
|
||||||
hir::Movability::Movable => p!("[generator"),
|
|
||||||
hir::Movability::Static => p!("[static generator"),
|
|
||||||
>>>>>>> 4bc0ae233aa... updated p! macro to accept literals
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.tcx().sess.verbose() {
|
if !self.tcx().sess.verbose() {
|
||||||
@ -691,7 +686,6 @@ pub trait PrettyPrinter<'tcx>:
|
|||||||
p!(in_binder(&types));
|
p!(in_binder(&types));
|
||||||
}
|
}
|
||||||
ty::Closure(did, substs) => {
|
ty::Closure(did, substs) => {
|
||||||
<<<<<<< HEAD
|
|
||||||
p!(write("["));
|
p!(write("["));
|
||||||
if !self.tcx().sess.verbose() {
|
if !self.tcx().sess.verbose() {
|
||||||
p!(write("closure"));
|
p!(write("closure"));
|
||||||
@ -703,33 +697,6 @@ pub trait PrettyPrinter<'tcx>:
|
|||||||
} 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)));
|
||||||
=======
|
|
||||||
p!("[closure");
|
|
||||||
|
|
||||||
// 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);
|
|
||||||
if self.tcx().sess.opts.debugging_opts.span_free_formats {
|
|
||||||
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)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if substs.as_closure().is_valid() {
|
|
||||||
let upvar_tys = substs.as_closure().upvar_tys();
|
|
||||||
let mut sep = " ";
|
|
||||||
for (&var_id, upvar_ty) in self
|
|
||||||
.tcx()
|
|
||||||
.upvars_mentioned(did)
|
|
||||||
.as_ref()
|
|
||||||
.iter()
|
|
||||||
.flat_map(|v| v.keys())
|
|
||||||
.zip(upvar_tys)
|
|
||||||
{
|
|
||||||
p!(write("{}{}:", sep, self.tcx().hir().name(var_id)), print(upvar_ty));
|
|
||||||
sep = ", ";
|
|
||||||
>>>>>>> 4bc0ae233aa... updated p! macro to accept literals
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p!(write("@{}", self.tcx().def_path_str(did)));
|
p!(write("@{}", self.tcx().def_path_str(did)));
|
||||||
@ -756,17 +723,7 @@ pub trait PrettyPrinter<'tcx>:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
p!("]");
|
p!("]");
|
||||||
=======
|
|
||||||
|
|
||||||
if self.tcx().sess.verbose() && substs.as_closure().is_valid() {
|
|
||||||
p!(" closure_kind_ty=", print(substs.as_closure().kind_ty()));
|
|
||||||
p!(" closure_sig_as_fn_ptr_ty=", print(substs.as_closure().sig_as_fn_ptr_ty()));
|
|
||||||
}
|
|
||||||
|
|
||||||
p!("]")
|
|
||||||
>>>>>>> 4bc0ae233aa... updated p! macro to accept literals
|
|
||||||
}
|
}
|
||||||
ty::Array(ty, sz) => {
|
ty::Array(ty, sz) => {
|
||||||
p!("[", print(ty), "; ");
|
p!("[", print(ty), "; ");
|
||||||
|
Loading…
Reference in New Issue
Block a user