@@ -1811,14 +1811,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1811
1811
}
1812
1812
}
1813
1813
1814
- // Next, check the module's imports if necessary.
1815
-
1816
- // If this is a search of all imports, we should be done with glob
1817
- // resolution at this point.
1818
- if name_search_type == PathSearch {
1819
- assert_eq ! ( module_. glob_count. get( ) , 0 ) ;
1820
- }
1821
-
1822
1814
// Check the list of resolved imports.
1823
1815
let children = module_. import_resolutions . borrow ( ) ;
1824
1816
match children. get ( & name) {
@@ -2935,9 +2927,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
2935
2927
}
2936
2928
}
2937
2929
2938
- Indeterminate => {
2939
- panic ! ( "unexpected indeterminate result" ) ;
2940
- }
2930
+ Indeterminate => return BareIdentifierPatternUnresolved ,
2941
2931
Failed ( err) => {
2942
2932
match err {
2943
2933
Some ( ( span, msg) ) => {
@@ -3195,7 +3185,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
3195
3185
resolve_error ( self , span, ResolutionError :: FailedToResolve ( & * msg) ) ;
3196
3186
return None ;
3197
3187
}
3198
- Indeterminate => panic ! ( "indeterminate unexpected" ) ,
3188
+ Indeterminate => return None ,
3199
3189
Success ( ( resulting_module, resulting_last_private) ) => {
3200
3190
containing_module = resulting_module;
3201
3191
last_private = resulting_last_private;
@@ -3258,9 +3248,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
3258
3248
return None ;
3259
3249
}
3260
3250
3261
- Indeterminate => {
3262
- panic ! ( "indeterminate unexpected" ) ;
3263
- }
3251
+ Indeterminate => return None ,
3264
3252
3265
3253
Success ( ( resulting_module, resulting_last_private) ) => {
3266
3254
containing_module = resulting_module;
@@ -3355,9 +3343,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
3355
3343
}
3356
3344
}
3357
3345
}
3358
- Indeterminate => {
3359
- panic ! ( "unexpected indeterminate result" ) ;
3360
- }
3346
+ Indeterminate => None ,
3361
3347
Failed ( err) => {
3362
3348
debug ! ( "(resolving item path by identifier in lexical scope) failed to resolve {}" ,
3363
3349
name) ;
0 commit comments