File tree 1 file changed +7
-6
lines changed
compiler/rustc_middle/src/ty
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -473,16 +473,17 @@ impl<'tcx> TyCtxt<'tcx> {
473
473
let mut seen = GrowableBitSet :: default ( ) ;
474
474
for arg in substs {
475
475
match arg. unpack ( ) {
476
- GenericArgKind :: Lifetime ( lt) => {
477
- if ignore_regions == CheckRegions :: OnlyEarlyBound {
478
- let ty:: ReEarlyBound ( p) = lt. kind ( ) else {
479
- return Err ( NotUniqueParam :: NotParam ( lt. into ( ) ) )
480
- } ;
476
+ GenericArgKind :: Lifetime ( lt) => match ( ignore_regions, lt. kind ( ) ) {
477
+ ( CheckRegions :: OnlyEarlyBound , ty:: ReEarlyBound ( p) ) => {
481
478
if !seen. insert ( p. index ) {
482
479
return Err ( NotUniqueParam :: DuplicateParam ( lt. into ( ) ) ) ;
483
480
}
484
481
}
485
- }
482
+ ( CheckRegions :: OnlyEarlyBound , _) => {
483
+ return Err ( NotUniqueParam :: NotParam ( lt. into ( ) ) ) ;
484
+ }
485
+ ( CheckRegions :: No , _) => { }
486
+ } ,
486
487
GenericArgKind :: Type ( t) => match t. kind ( ) {
487
488
ty:: Param ( p) => {
488
489
if !seen. insert ( p. index ) {
You can’t perform that action at this time.
0 commit comments