diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index bcc76c20815..aad7d21e1b4 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -1775,21 +1775,13 @@ pub(super) fn recover_seq_parse_error( lo: Span, result: PResult<'a, P>, ) -> P { - use crate::parser::DUMMY_NODE_ID; match result { Ok(x) => x, Err(mut err) => { err.emit(); // Recover from parse error, callers expect the closing delim to be consumed. self.consume_block(delim, ConsumeClosingDelim::Yes); - debug!("recover_seq_parse_error: consumed tokens until {:?} {:?}", lo, self.token); - let res = self.mk_expr(lo.to(self.prev_token.span), ExprKind::Err); - if res.id == DUMMY_NODE_ID { - //panic!("debug now ....: {:?}", res); - res - } else { - res - } + self.mk_expr(lo.to(self.prev_token.span), ExprKind::Err) } } } @@ -1871,7 +1863,6 @@ pub(super) fn recover_stmt_( && brace_depth == 0 && bracket_depth == 0 => { - debug!("recover_stmt_ return - Comma"); break; } _ => self.bump(), diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 323588c4ff5..950efc2a9fc 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -202,9 +202,6 @@ pub(super) fn parse_path_inner( segments.push(PathSegment::path_root(lo.shrink_to_lo().with_ctxt(mod_sep_ctxt))); } self.parse_path_segments(&mut segments, style, ty_generics)?; - if segments.len() > 1 { - //panic!("debug now ..."); - } Ok(Path { segments, span: lo.to(self.prev_token.span), tokens: None }) } @@ -740,7 +737,6 @@ pub(super) fn parse_generic_arg( &mut self, ty_generics: Option<&Generics>, ) -> PResult<'a, Option> { - debug!("pain"); let start = self.token.span; let arg = if self.check_lifetime() && self.look_ahead(1, |t| !t.is_like_plus()) { // Parse lifetime argument. @@ -749,7 +745,6 @@ pub(super) fn parse_generic_arg( // Parse const argument. GenericArg::Const(self.parse_const_arg()?) } else if self.check_type() { - debug!("type"); // Parse type argument. // Proactively create a parser snapshot enabling us to rewind and try to reparse the diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index aebd8125e2c..4b7048eac04 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -777,10 +777,6 @@ pub(crate) fn into_struct_error( .sess .create_err(errs::SelfImportOnlyInImportListWithNonEmptyPrefix { span }), ResolutionError::FailedToResolve { label, suggestion } => { - if label.len() > 0 { - //panic!("debug now"); - } - let mut err = struct_span_err!(self.tcx.sess, span, E0433, "failed to resolve: {}", &label); err.span_label(span, label); diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index ba4fe20703f..547471ca90d 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -3715,7 +3715,6 @@ fn resolve_qpath_anywhere( } /// Handles paths that may refer to associated items. - #[instrument(level = "debug", skip(self))] fn resolve_qpath( &mut self, qself: &Option>, @@ -3723,6 +3722,10 @@ fn resolve_qpath( ns: Namespace, finalize: Finalize, ) -> Result, Spanned>> { + debug!( + "resolve_qpath(qself={:?}, path={:?}, ns={:?}, finalize={:?})", + qself, path, ns, finalize, + ); if let Some(qself) = qself { if qself.position == 0 { // This is a case like `::B`, where there is no diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 6e1b80860ba..383648877c8 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -305,7 +305,6 @@ fn make_base_error( /// Handles error reporting for `smart_resolve_path_fragment` function. /// Creates base error and amends it with one short label and possibly some longer helps/notes. - #[instrument(level = "debug", skip(self))] pub(crate) fn smart_resolve_report_errors( &mut self, path: &[Segment],