summaryrefslogtreecommitdiff
path: root/src/ir/layout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/layout.rs')
-rw-r--r--src/ir/layout.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir/layout.rs b/src/ir/layout.rs
index bc3f8a5a..cca33cc3 100644
--- a/src/ir/layout.rs
+++ b/src/ir/layout.rs
@@ -88,7 +88,8 @@ impl Opaque {
pub fn from_clang_ty(ty: &clang::Type) -> Type {
let layout = Layout::new(ty.size(), ty.align());
let ty_kind = TypeKind::Opaque;
- Type::new(None, Some(layout), ty_kind, false)
+ let is_const = ty.is_const();
+ Type::new(None, Some(layout), ty_kind, is_const)
}
/// Return the known rust type we should use to create a correctly-aligned