File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
branches/try/src/librustc/middle/typeck Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: f2fa55903e378368ed9173560f03a0ef16e371c2
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5
- refs/heads/try: 8876ce44c59bbb20006ae5beccc9f6954e7d1e4f
5
+ refs/heads/try: 8d2e7161ee7f1aa28f8f45a60d71d5559eb0d527
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -60,29 +60,25 @@ fn get_base_type(inference_context: &InferCtxt,
60
60
span : Span ,
61
61
original_type : t )
62
62
-> 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,
71
68
_ => {
72
69
inference_context. tcx . sess . span_fatal ( span,
73
70
"the type of this value must be known in order \
74
71
to determine the base type") ;
75
72
}
76
- }
73
+ } ;
77
74
78
75
match get ( resolved_type) . sty {
79
76
ty_enum( ..) | ty_struct( ..) | ty_unboxed_closure( ..) => {
80
77
debug ! ( "(getting base type) found base type" ) ;
81
78
Some ( resolved_type)
82
79
}
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) => {
86
82
debug ! ( "(getting base type) found base type (trait)" ) ;
87
83
Some ( resolved_type)
88
84
}
You can’t perform that action at this time.
0 commit comments