File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
src/librustc/middle/typeck Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -60,29 +60,25 @@ fn get_base_type(inference_context: &InferCtxt,
6060 span : Span ,
6161 original_type : t )
6262 -> Option < t > {
63- let resolved_type;
64- match resolve_type ( inference_context,
65- Some ( span) ,
66- original_type,
67- resolve_ivar) {
68- Ok ( resulting_type) if !type_is_ty_var ( resulting_type) => {
69- resolved_type = resulting_type;
70- }
63+ let resolved_type = match resolve_type ( inference_context,
64+ Some ( span) ,
65+ original_type,
66+ resolve_ivar) {
67+ Ok ( resulting_type) if !type_is_ty_var ( resulting_type) => resulting_type,
7168 _ => {
7269 inference_context. tcx . sess . span_fatal ( span,
7370 "the type of this value must be known in order \
7471 to determine the base type") ;
7572 }
76- }
73+ } ;
7774
7875 match get ( resolved_type) . sty {
7976 ty_enum( ..) | ty_struct( ..) | ty_unboxed_closure( ..) => {
8077 debug ! ( "(getting base type) found base type" ) ;
8178 Some ( resolved_type)
8279 }
83- // FIXME(14865) I would prefere to use `_` here, but that causes a
84- // compiler error.
85- ty_uniq( _) | ty_rptr( _, _) | ty_trait( ..) if ty:: type_is_trait ( resolved_type) => {
80+
81+ _ if ty:: type_is_trait ( resolved_type) => {
8682 debug ! ( "(getting base type) found base type (trait)" ) ;
8783 Some ( resolved_type)
8884 }
You can’t perform that action at this time.
0 commit comments