@@ -2316,59 +2316,59 @@ pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
2316
2316
:: util:: ppaux:: ty_to_str( cx, ty) ) ;
2317
2317
2318
2318
let r = match get ( ty) . sty {
2319
- ty_nil |
2320
- ty_bot |
2321
- ty_bool |
2322
- ty_int( _) |
2323
- ty_uint( _) |
2324
- ty_float( _) |
2325
- ty_estr( _) |
2326
- ty_bare_fn( _) |
2327
- ty_closure( _) |
2328
- ty_infer( _) |
2329
- ty_err |
2330
- ty_param( _) |
2331
- ty_self( _) |
2332
- ty_type |
2333
- ty_opaque_box |
2334
- ty_opaque_closure_ptr( _) |
2335
- ty_evec( _, _) |
2336
- ty_unboxed_vec( _) => {
2337
- false
2338
- }
2339
- ty_box( ref mt) |
2340
- ty_uniq( ref mt) |
2341
- ty_rptr( _, ref mt) => {
2342
- return type_requires ( cx, seen, r_ty, mt. ty ) ;
2343
- }
2319
+ ty_nil |
2320
+ ty_bot |
2321
+ ty_bool |
2322
+ ty_int( _) |
2323
+ ty_uint( _) |
2324
+ ty_float( _) |
2325
+ ty_estr( _) |
2326
+ ty_bare_fn( _) |
2327
+ ty_closure( _) |
2328
+ ty_infer( _) |
2329
+ ty_err |
2330
+ ty_param( _) |
2331
+ ty_self( _) |
2332
+ ty_type |
2333
+ ty_opaque_box |
2334
+ ty_opaque_closure_ptr( _) |
2335
+ ty_evec( _, _) |
2336
+ ty_unboxed_vec( _) => {
2337
+ false
2338
+ }
2339
+ ty_box( ref mt) |
2340
+ ty_uniq( ref mt) |
2341
+ ty_rptr( _, ref mt) => {
2342
+ type_requires ( cx, seen, r_ty, mt. ty )
2343
+ }
2344
2344
2345
- ty_ptr( * ) => {
2346
- false // unsafe ptrs can always be NULL
2347
- }
2345
+ ty_ptr( * ) => {
2346
+ false // unsafe ptrs can always be NULL
2347
+ }
2348
2348
2349
- ty_trait( _, _, _, _) => {
2350
- false
2351
- }
2349
+ ty_trait( _, _, _, _) => {
2350
+ false
2351
+ }
2352
2352
2353
- ty_struct( ref did, _) if vec:: contains ( * seen, did) => {
2354
- false
2355
- }
2353
+ ty_struct( ref did, _) if vec:: contains ( * seen, did) => {
2354
+ false
2355
+ }
2356
2356
2357
- ty_struct( did, ref substs) => {
2358
- seen. push ( did) ;
2359
- let fields = struct_fields ( cx, did, substs) ;
2360
- let r = fields. iter ( ) . any ( |f| type_requires ( cx, seen, r_ty, f. mt . ty ) ) ;
2361
- seen. pop ( ) ;
2362
- r
2363
- }
2357
+ ty_struct( did, ref substs) => {
2358
+ seen. push ( did) ;
2359
+ let fields = struct_fields ( cx, did, substs) ;
2360
+ let r = fields. iter ( ) . any ( |f| type_requires ( cx, seen, r_ty, f. mt . ty ) ) ;
2361
+ seen. pop ( ) ;
2362
+ r
2363
+ }
2364
2364
2365
- ty_tup( ref ts) => {
2366
- ts. any ( |t| type_requires ( cx, seen, r_ty, * t) )
2367
- }
2365
+ ty_tup( ref ts) => {
2366
+ ts. any ( |t| type_requires ( cx, seen, r_ty, * t) )
2367
+ }
2368
2368
2369
- ty_enum( ref did, _) if vec:: contains ( * seen, did) => {
2370
- false
2371
- }
2369
+ ty_enum( ref did, _) if vec:: contains ( * seen, did) => {
2370
+ false
2371
+ }
2372
2372
2373
2373
ty_enum( did, ref substs) => {
2374
2374
seen. push ( did) ;
@@ -2392,8 +2392,8 @@ pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
2392
2392
return r;
2393
2393
}
2394
2394
2395
- let seen = @ mut ~[ ] ;
2396
- !subtypes_require ( cx, seen, r_ty, r_ty)
2395
+ let mut seen = ~[ ] ;
2396
+ !subtypes_require ( cx, & mut seen, r_ty, r_ty)
2397
2397
}
2398
2398
2399
2399
pub fn type_structurally_contains ( cx : ctxt ,
0 commit comments