@@ -564,13 +564,14 @@ impl<'a> PathSource<'a> {
564
564
Def :: StructCtor ( _, CtorKind :: Const ) | Def :: StructCtor ( _, CtorKind :: Fn ) |
565
565
Def :: VariantCtor ( _, CtorKind :: Const ) | Def :: VariantCtor ( _, CtorKind :: Fn ) |
566
566
Def :: Const ( ..) | Def :: Static ( ..) | Def :: Local ( ..) | Def :: Upvar ( ..) |
567
- Def :: Fn ( ..) | Def :: Method ( ..) | Def :: AssociatedConst ( ..) | Def :: ConstParam ( ..) => true ,
567
+ Def :: Fn ( ..) | Def :: Method ( ..) | Def :: AssociatedConst ( ..)
568
+ | Def :: ConstParam ( ..) => true ,
568
569
_ => false ,
569
570
} ,
570
571
PathSource :: Pat => match def {
571
572
Def :: StructCtor ( _, CtorKind :: Const ) |
572
573
Def :: VariantCtor ( _, CtorKind :: Const ) |
573
- Def :: Const ( ..) | Def :: AssociatedConst ( ..) | Def :: ConstParam ( .. ) => true ,
574
+ Def :: Const ( ..) | Def :: AssociatedConst ( ..) => true ,
574
575
_ => false ,
575
576
} ,
576
577
PathSource :: TupleStruct => match def {
@@ -2873,15 +2874,14 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
2873
2874
match def {
2874
2875
Def :: StructCtor ( _, CtorKind :: Const ) |
2875
2876
Def :: VariantCtor ( _, CtorKind :: Const ) |
2876
- Def :: ConstParam ( ..) |
2877
2877
Def :: Const ( ..) if is_syntactic_ambiguity => {
2878
2878
// Disambiguate in favor of a unit struct/variant
2879
2879
// or constant pattern.
2880
2880
self . record_use ( ident, ValueNS , binding. unwrap ( ) , ident. span ) ;
2881
2881
Some ( PathResolution :: new ( def) )
2882
2882
}
2883
2883
Def :: StructCtor ( ..) | Def :: VariantCtor ( ..) |
2884
- Def :: ConstParam ( .. ) | Def :: Const ( ..) | Def :: Static ( ..) => {
2884
+ Def :: Const ( ..) | Def :: Static ( ..) => {
2885
2885
// This is unambiguously a fresh binding, either syntactically
2886
2886
// (e.g. `IDENT @ PAT` or `ref IDENT`) or because `IDENT` resolves
2887
2887
// to something unusable as a pattern (e.g. constructor function),
0 commit comments