@@ -166,16 +166,15 @@ class CoherenceChecker {
166
166
self . get_base_type ( base_mutability_and_type. ty )
167
167
}
168
168
169
- ty_enum ( * ) | ty_class ( * ) {
169
+ ty_enum ( * ) | ty_trait ( * ) | ty_class ( * ) {
170
170
some ( original_type)
171
171
}
172
172
173
173
ty_nil | ty_bot | ty_bool | ty_int ( * ) | ty_uint ( * ) | ty_float ( * ) |
174
174
ty_str | ty_estr ( * ) | ty_vec ( * ) | ty_evec ( * ) | ty_rec ( * ) |
175
- ty_fn ( * ) | ty_trait ( * ) | ty_tup ( * ) | ty_var ( * ) |
176
- ty_var_integral ( * ) | ty_param ( * ) | ty_self | ty_constr ( * ) |
177
- ty_type | ty_opaque_box | ty_opaque_closure_ptr ( * ) |
178
- ty_unboxed_vec ( * ) {
175
+ ty_fn ( * ) | ty_tup ( * ) | ty_var ( * ) | ty_var_integral ( * ) |
176
+ ty_param ( * ) | ty_self | ty_constr ( * ) | ty_type | ty_opaque_box |
177
+ ty_opaque_closure_ptr ( * ) | ty_unboxed_vec ( * ) {
179
178
none
180
179
}
181
180
}
@@ -189,12 +188,14 @@ class CoherenceChecker {
189
188
}
190
189
some ( base_type) {
191
190
alt get ( base_type) . struct {
192
- ty_enum ( def_id, _) | ty_class ( def_id, _) {
191
+ ty_enum ( def_id, _) |
192
+ ty_class ( def_id, _) |
193
+ ty_trait ( def_id, _) {
193
194
ret some ( def_id) ;
194
195
}
195
196
_ {
196
197
fail "get_base_type() returned a type that wasn't an \
197
- enum or class ";
198
+ enum, class, or trait ";
198
199
}
199
200
}
200
201
}
@@ -394,13 +395,13 @@ class CoherenceChecker {
394
395
let results = @dvec ( ) ;
395
396
for items. each |item| {
396
397
alt item. node {
397
- item_class( * ) | item_enum( * ) {
398
+ item_class( * ) | item_enum( * ) | item_trait ( * ) {
398
399
results. push ( local_def ( item. id ) ) ;
399
400
}
400
401
401
402
item_const ( * ) | item_fn ( * ) | item_mod ( * ) |
402
- item_foreign_mod ( * ) | item_ty ( * ) | item_trait ( * ) |
403
- item_impl ( * ) | item_mac( * ) {
403
+ item_foreign_mod ( * ) | item_ty ( * ) | item_impl ( * ) |
404
+ item_mac( * ) {
404
405
// Nothing to do.
405
406
}
406
407
}
0 commit comments