@@ -564,13 +564,14 @@ impl<'a> PathSource<'a> {
564564 Def :: StructCtor ( _, CtorKind :: Const ) | Def :: StructCtor ( _, CtorKind :: Fn ) |
565565 Def :: VariantCtor ( _, CtorKind :: Const ) | Def :: VariantCtor ( _, CtorKind :: Fn ) |
566566 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 ,
568569 _ => false ,
569570 } ,
570571 PathSource :: Pat => match def {
571572 Def :: StructCtor ( _, CtorKind :: Const ) |
572573 Def :: VariantCtor ( _, CtorKind :: Const ) |
573- Def :: Const ( ..) | Def :: AssociatedConst ( ..) | Def :: ConstParam ( .. ) => true ,
574+ Def :: Const ( ..) | Def :: AssociatedConst ( ..) => true ,
574575 _ => false ,
575576 } ,
576577 PathSource :: TupleStruct => match def {
@@ -2873,15 +2874,14 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
28732874 match def {
28742875 Def :: StructCtor ( _, CtorKind :: Const ) |
28752876 Def :: VariantCtor ( _, CtorKind :: Const ) |
2876- Def :: ConstParam ( ..) |
28772877 Def :: Const ( ..) if is_syntactic_ambiguity => {
28782878 // Disambiguate in favor of a unit struct/variant
28792879 // or constant pattern.
28802880 self . record_use ( ident, ValueNS , binding. unwrap ( ) , ident. span ) ;
28812881 Some ( PathResolution :: new ( def) )
28822882 }
28832883 Def :: StructCtor ( ..) | Def :: VariantCtor ( ..) |
2884- Def :: ConstParam ( .. ) | Def :: Const ( ..) | Def :: Static ( ..) => {
2884+ Def :: Const ( ..) | Def :: Static ( ..) => {
28852885 // This is unambiguously a fresh binding, either syntactically
28862886 // (e.g. `IDENT @ PAT` or `ref IDENT`) or because `IDENT` resolves
28872887 // to something unusable as a pattern (e.g. constructor function),
0 commit comments