]> git.lizzy.rs Git - rust.git/commitdiff
Iface types are not structural
authorMarijn Haverbeke <marijnh@gmail.com>
Mon, 9 Jan 2012 15:44:22 +0000 (16:44 +0100)
committerMarijn Haverbeke <marijnh@gmail.com>
Mon, 9 Jan 2012 15:44:37 +0000 (16:44 +0100)
Not sure how they ended up being marked as such.

src/comp/middle/ty.rs

index 42225aa2acaeceabfc6989949631143ddb5b4e8f..84db898d21ef572dcb8ba5032ffe255ee2b62b49 100644 (file)
@@ -847,8 +847,7 @@ fn type_is_bool(cx: ctxt, ty: t) -> bool {
 fn type_is_structural(cx: ctxt, ty: t) -> bool {
     alt struct(cx, ty) {
       ty_rec(_) | ty_tup(_) | ty_tag(_, _) | ty_fn(_) |
-      ty_native_fn(_, _) | ty_obj(_) | ty_res(_, _, _) |
-      ty_iface(_, _) { true }
+      ty_native_fn(_, _) | ty_obj(_) | ty_res(_, _, _) { true }
       _ { false }
     }
 }