From 50326740651c182e430c8a075e07ae39d3eb180e Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Sep 2020 10:54:27 -0600 Subject: [PATCH] fixed merge conflicts --- compiler/rustc_middle/src/ty/print/pretty.rs | 43 -------------------- 1 file changed, 43 deletions(-) diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 8166e1dd6ff..c4246fa1d95 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -646,13 +646,8 @@ pub trait PrettyPrinter<'tcx>: ty::Generator(did, substs, movability) => { p!(write("[")); match movability { -<<<<<<< HEAD hir::Movability::Movable => {} 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() { @@ -691,7 +686,6 @@ pub trait PrettyPrinter<'tcx>: p!(in_binder(&types)); } ty::Closure(did, substs) => { -<<<<<<< HEAD p!(write("[")); if !self.tcx().sess.verbose() { p!(write("closure")); @@ -703,33 +697,6 @@ pub trait PrettyPrinter<'tcx>: } else { let span = self.tcx().hir().span(hir_id); 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 { p!(write("@{}", self.tcx().def_path_str(did))); @@ -756,17 +723,7 @@ pub trait PrettyPrinter<'tcx>: } } } -<<<<<<< HEAD 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) => { p!("[", print(ty), "; ");