@@ -459,7 +459,7 @@ impl DisplayWith<ModuleInfo> for Key {
459
459
Self :: Delete ( r) => write ! ( f, "Key::Delete({})" , ctx. display( r) ) ,
460
460
Self :: SelfTypeLiteral ( r) => write ! ( f, "Key::SelfTypeLiteral({})" , ctx. display( r) ) ,
461
461
Self :: PossibleLegacyTParam ( r) => {
462
- write ! ( f, "Key::CheckLegacyTypeParam ({})" , ctx. display( r) )
462
+ write ! ( f, "Key::PossibleLegacyTParam ({})" , ctx. display( r) )
463
463
}
464
464
Self :: PatternNarrow ( r) => write ! ( f, "Key::PatternNarrow({})" , ctx. display( r) ) ,
465
465
}
@@ -1226,13 +1226,10 @@ pub enum Binding {
1226
1226
/// with the previous import to this binding (in which case merge the modules).
1227
1227
Module ( ModuleName , Vec < Name > , Option < Idx < Key > > ) ,
1228
1228
/// A name that might be a legacy type parameter. Solving this gives the Quantified type if so.
1229
- /// The TextRange is optional and should be set at most once per identifier
1230
- /// to avoid duplicate type errors (this is not type safe, because we might
1231
- /// produce multiple `CheckLegacyTypeParam` bindings for the same
1232
- /// identifier).
1233
- /// It controls whether to produce an error saying there are scoped type parameters for this
1234
- /// function / class, and therefore the use of legacy type parameters is invalid.
1235
- CheckLegacyTypeParam ( Idx < KeyLegacyTypeParam > , Option < TextRange > ) ,
1229
+ /// The TextRange is optional and controls whether to produce an error
1230
+ /// saying there are scoped type parameters for this function / class, and
1231
+ /// therefore the use of legacy type parameters is invalid.
1232
+ PossibleLegacyTParam ( Idx < KeyLegacyTypeParam > , Option < TextRange > ) ,
1236
1233
/// An assignment to a name.
1237
1234
NameAssign (
1238
1235
Name ,
@@ -1371,8 +1368,8 @@ impl DisplayWith<Bindings> for Binding {
1371
1368
Self :: TypeParameter ( tp) => {
1372
1369
write ! ( f, "TypeParameter({}, {}, ..)" , tp. unique, tp. kind)
1373
1370
}
1374
- Self :: CheckLegacyTypeParam ( k, _) => {
1375
- write ! ( f, "CheckLegacyTypeParam ({})" , ctx. display( * k) )
1371
+ Self :: PossibleLegacyTParam ( k, _) => {
1372
+ write ! ( f, "PossibleLegacyTParam ({})" , ctx. display( * k) )
1376
1373
}
1377
1374
Self :: AnnotatedType ( k1, k2) => {
1378
1375
write ! (
@@ -1549,7 +1546,7 @@ impl Binding {
1549
1546
| Binding :: ParamSpec ( _, _, _)
1550
1547
| Binding :: TypeVarTuple ( _, _, _)
1551
1548
| Binding :: TypeParameter ( _)
1552
- | Binding :: CheckLegacyTypeParam ( _, _) => Some ( SymbolKind :: TypeParameter ) ,
1549
+ | Binding :: PossibleLegacyTParam ( _, _) => Some ( SymbolKind :: TypeParameter ) ,
1553
1550
Binding :: Global ( _) => Some ( SymbolKind :: Variable ) ,
1554
1551
Binding :: Function ( _, _, _) => Some ( SymbolKind :: Function ) ,
1555
1552
Binding :: Import ( _, _, _) => {
0 commit comments