fix for bug #9110
This commit is contained in:
parent
b9a8b3700b
commit
f576ed0c76
@ -1757,7 +1757,7 @@ fn type_is_newtype_immediate(cx: ctxt, ty: t) -> bool {
|
||||
ty_struct(def_id, ref substs) => {
|
||||
let fields = struct_fields(cx, def_id, substs);
|
||||
fields.len() == 1 &&
|
||||
fields[0].ident == token::special_idents::unnamed_field &&
|
||||
fields[0].ident.name == token::special_idents::unnamed_field.name &&
|
||||
type_is_immediate(cx, fields[0].mt.ty)
|
||||
}
|
||||
_ => false
|
||||
|
Loading…
Reference in New Issue
Block a user