1
Fork 0

improve diagnosts for GATs

This commit is contained in:
b-naber 2021-02-18 21:01:44 +01:00
parent fe62c6e295
commit e4d9bc66f6
113 changed files with 1625 additions and 890 deletions

View file

@ -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<NodeId>,
) -> 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 {