@@ -2309,7 +2309,7 @@ impl<'a> Resolver<'a> {
2309
2309
) ;
2310
2310
err_path_resolution ( )
2311
2311
}
2312
- Def :: Local ( ..) | Def :: Upvar ( ..) | Def :: Fn ( ..) | Def :: Err => {
2312
+ Def :: Local ( ..) | Def :: Upvar ( ..) | Def :: Fn ( ..) => {
2313
2313
// These entities are explicitly allowed
2314
2314
// to be shadowed by fresh bindings.
2315
2315
self . fresh_binding ( ident, pat. id , outer_pat_id,
@@ -2331,7 +2331,7 @@ impl<'a> Resolver<'a> {
2331
2331
PatKind :: TupleStruct ( ref path, _, _) => {
2332
2332
self . resolve_pattern_path ( pat. id , None , path, ValueNS , |def| {
2333
2333
match def {
2334
- Def :: Struct ( ..) | Def :: Variant ( ..) | Def :: Err => true ,
2334
+ Def :: Struct ( ..) | Def :: Variant ( ..) => true ,
2335
2335
_ => false ,
2336
2336
}
2337
2337
} , "variant or struct" ) ;
@@ -2341,7 +2341,7 @@ impl<'a> Resolver<'a> {
2341
2341
self . resolve_pattern_path ( pat. id , qself. as_ref ( ) , path, ValueNS , |def| {
2342
2342
match def {
2343
2343
Def :: Struct ( ..) | Def :: Variant ( ..) |
2344
- Def :: Const ( ..) | Def :: AssociatedConst ( ..) | Def :: Err => true ,
2344
+ Def :: Const ( ..) | Def :: AssociatedConst ( ..) => true ,
2345
2345
_ => false ,
2346
2346
}
2347
2347
} , "variant, struct or constant" ) ;
@@ -2351,7 +2351,7 @@ impl<'a> Resolver<'a> {
2351
2351
self . resolve_pattern_path ( pat. id , None , path, TypeNS , |def| {
2352
2352
match def {
2353
2353
Def :: Struct ( ..) | Def :: Variant ( ..) |
2354
- Def :: TyAlias ( ..) | Def :: AssociatedTy ( ..) | Def :: Err => true ,
2354
+ Def :: TyAlias ( ..) | Def :: AssociatedTy ( ..) => true ,
2355
2355
_ => false ,
2356
2356
}
2357
2357
} , "variant, struct or type alias" ) ;
@@ -2482,7 +2482,7 @@ impl<'a> Resolver<'a> {
2482
2482
record_used : bool )
2483
2483
-> Option < LocalDef > {
2484
2484
if identifier. name == keywords:: Invalid . name ( ) {
2485
- return Some ( LocalDef :: from_def ( Def :: Err ) ) ;
2485
+ return None ;
2486
2486
}
2487
2487
2488
2488
self . resolve_ident_in_lexical_scope ( identifier, namespace, record_used)
0 commit comments