diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-03-05 08:32:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 08:32:14 +0100 |
commit | f9fe3d157192ab0738e08f1da69c4be30ed289d4 (patch) | |
tree | 2e70d0804b597ec4581ede9a16c28b6506993a28 /src/codegen/struct_layout.rs | |
parent | d5ca4e7e90a3a5ebfeff1041c7eaeb7596d9c1a5 (diff) | |
parent | cfd153cc64c3212e3a19e78837f3a45884975641 (diff) |
Merge pull request #1269 from emilio/so-many-questions. r=nox
Untry.
Diffstat (limited to 'src/codegen/struct_layout.rs')
-rw-r--r-- | src/codegen/struct_layout.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/codegen/struct_layout.rs b/src/codegen/struct_layout.rs index 32b48965..a538c35f 100644 --- a/src/codegen/struct_layout.rs +++ b/src/codegen/struct_layout.rs @@ -155,10 +155,7 @@ impl<'a> StructLayoutTracker<'a> { field_ty: &Type, field_offset: Option<usize>, ) -> Option<quote::Tokens> { - let mut field_layout = match field_ty.layout(self.ctx) { - Some(l) => l, - None => return None, - }; + let mut field_layout = field_ty.layout(self.ctx)?; if let TypeKind::Array(inner, len) = *field_ty.canonical_type(self.ctx).kind() |