Skip to content

Commit 3689115

Browse files
committed
---
yaml --- r: 63197 b: refs/heads/snap-stage3 c: 3f62f9b h: refs/heads/master i: 63195: dc61e59 v: v3
1 parent b2e83ca commit 3689115

File tree

2 files changed

+50
-50
lines changed

2 files changed

+50
-50
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 278b3beafe11be3127b6780850d3d414e833e5b7
4+
refs/heads/snap-stage3: 3f62f9bccd618b74761dd8bd7710970445d7a2f9
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/ty.rs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,59 +2316,59 @@ pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
23162316
::util::ppaux::ty_to_str(cx, ty));
23172317

23182318
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+
}
23442344

2345-
ty_ptr(*) => {
2346-
false // unsafe ptrs can always be NULL
2347-
}
2345+
ty_ptr(*) => {
2346+
false // unsafe ptrs can always be NULL
2347+
}
23482348

2349-
ty_trait(_, _, _, _) => {
2350-
false
2351-
}
2349+
ty_trait(_, _, _, _) => {
2350+
false
2351+
}
23522352

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+
}
23562356

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+
}
23642364

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+
}
23682368

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+
}
23722372

23732373
ty_enum(did, ref substs) => {
23742374
seen.push(did);
@@ -2392,8 +2392,8 @@ pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
23922392
return r;
23932393
}
23942394

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)
23972397
}
23982398

23992399
pub fn type_structurally_contains(cx: ctxt,

0 commit comments

Comments
 (0)