diff options
| author | yukang <moorekang@gmail.com> | 2023-03-14 23:48:33 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2023-05-01 16:15:17 +0800 |
| commit | 1b08eaca200ea5c7f6455b0302e031b479fb33dc (patch) | |
| tree | 650c48bb6f2cff09acc63aaa817d7c6c1ae49d94 /compiler/rustc_resolve/src | |
| parent | 10512b2932ba91ddde1ab92c6bb9662f751092c3 (diff) | |
| download | rust-1b08eaca200ea5c7f6455b0302e031b479fb33dc.tar.gz rust-1b08eaca200ea5c7f6455b0302e031b479fb33dc.zip | |
clean up debug code
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 1 |
3 files changed, 4 insertions, 6 deletions
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 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { .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 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { } /// Handles paths that may refer to associated items. - #[instrument(level = "debug", skip(self))] fn resolve_qpath( &mut self, qself: &Option<P<QSelf>>, @@ -3723,6 +3722,10 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { ns: Namespace, finalize: Finalize, ) -> Result<Option<PartialRes>, Spanned<ResolutionError<'a>>> { + 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 `<T>::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 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { /// 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], |
