diff options
author | Nick Fitzgerald <fitzgen@gmail.com> | 2017-10-02 13:16:45 -0700 |
---|---|---|
committer | Nick Fitzgerald <fitzgen@gmail.com> | 2017-10-02 13:16:45 -0700 |
commit | a8c34ed60da2539f9e784c039110d29c7b34fd89 (patch) | |
tree | a54bec2192d62596f9378eb8db0e38e93af01a73 /src/codegen/mod.rs | |
parent | 3495d03e98bfe623f83083d1788e08f73d876a59 (diff) |
Tighten up `is_unsized` and `has_vtable` checks to operated on TypeId
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index ce5054c9..264b701b 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -1626,7 +1626,7 @@ impl CodeGenerator for CompInfo { warn!("Opaque type without layout! Expect dragons!"); } } - } else if !is_union && !self.is_unsized(ctx, item.id()) { + } else if !is_union && !self.is_unsized(ctx, item.id().expect_type_id(ctx)) { if let Some(padding_field) = layout.and_then(|layout| struct_layout.pad_struct(layout)) { @@ -1650,7 +1650,7 @@ impl CodeGenerator for CompInfo { // // NOTE: This check is conveniently here to avoid the dummy fields we // may add for unused template parameters. - if self.is_unsized(ctx, item.id()) { + if self.is_unsized(ctx, item.id().expect_type_id(ctx)) { let has_address = if is_opaque { // Generate the address field if it's an opaque type and // couldn't determine the layout of the blob. |