From e4d9bc66f65fd3d206587c07e33c4877fda073f9 Mon Sep 17 00:00:00 2001 From: b-naber Date: Thu, 18 Feb 2021 21:01:44 +0100 Subject: improve diagnosts for GATs --- compiler/rustc_ast_lowering/src/path.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_ast_lowering/src') diff --git a/compiler/rustc_ast_lowering/src/path.rs b/compiler/rustc_ast_lowering/src/path.rs index 46dac2f1af4..82a0983e2a1 100644 --- a/compiler/rustc_ast_lowering/src/path.rs +++ b/compiler/rustc_ast_lowering/src/path.rs @@ -24,6 +24,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { param_mode: ParamMode, mut itctx: ImplTraitContext<'_, 'hir>, ) -> hir::QPath<'hir> { + debug!("lower_qpath(id: {:?}, qself: {:?}, p: {:?})", id, qself, p); let qself_position = qself.as_ref().map(|q| q.position); let qself = qself.as_ref().map(|q| self.lower_ty(&q.ty, itctx.reborrow())); @@ -222,6 +223,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { itctx: ImplTraitContext<'_, 'hir>, explicit_owner: Option, ) -> hir::PathSegment<'hir> { + debug!( + "path_span: {:?}, lower_path_segment(segment: {:?}, expected_lifetimes: {:?})", + path_span, segment, expected_lifetimes + ); let (mut generic_args, infer_args) = if let Some(ref generic_args) = segment.args { let msg = "parenthesized type parameters may only be used with a `Fn` trait"; match **generic_args { -- cgit 1.4.1-3-g733a5