File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -616,12 +616,7 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes(
616616 let msg = "cannot specify lifetime arguments explicitly \
617617 if late bound lifetime parameters are present";
618618 let note = "the late bound lifetime parameter is introduced here" ;
619- let Some ( first_lifetime_arg) =
620- args. args . iter ( ) . find ( |arg| matches ! ( arg, GenericArg :: Lifetime ( _) ) )
621- else {
622- return ExplicitLateBound :: No ;
623- } ;
624- let span = first_lifetime_arg. span ( ) ;
619+ let span = args. args [ 0 ] . span ( ) ;
625620
626621 if position == GenericArgPosition :: Value
627622 && args. num_lifetime_params ( ) != param_counts. lifetimes
@@ -634,7 +629,7 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes(
634629 multispan. push_span_label ( span_late, note) ;
635630 cx. tcx ( ) . node_span_lint (
636631 LATE_BOUND_LIFETIME_ARGUMENTS ,
637- first_lifetime_arg . hir_id ( ) ,
632+ args . args [ 0 ] . hir_id ( ) ,
638633 multispan,
639634 |lint| {
640635 lint. primary_message ( msg) ;
You can’t perform that action at this time.
0 commit comments