Rework diagnostics for wrong number of generic args
This commit is contained in:
parent
34628e5b53
commit
d2f8e398f1
121 changed files with 2787 additions and 766 deletions
|
@ -1433,7 +1433,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
|||
hir::TyKind::Path(ref qpath) => {
|
||||
if let QPath::Resolved(_, path) = qpath {
|
||||
let last_segment = &path.segments[path.segments.len() - 1];
|
||||
let generics = last_segment.generic_args();
|
||||
let generics = last_segment.args();
|
||||
for arg in generics.args.iter() {
|
||||
if let GenericArg::Lifetime(lt) = arg {
|
||||
if lt.name.ident() == name {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue