summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-03-10 07:15:10 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-03-13 12:15:47 +0100
commitb91583f101eca2c80b9424968a0e68fefc3571af (patch)
tree42009e76893d941845326ee0c86580076e240607 /src/codegen/mod.rs
parent96b26b308dbfb5acde0ede785dcbb7d276ef98f2 (diff)
Add a kill-switch for untagged unions.
Otherwise we can't use repr(align) on stylo.
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r--src/codegen/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 950708a0..a6ab3997 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -1641,7 +1641,7 @@ impl CodeGenerator for CompInfo {
attributes.push(attributes::repr("C"));
}
- if ctx.options().rust_features().repr_align() {
+ if ctx.options().rust_features().repr_align {
if let Some(explicit) = explicit_align {
// Ensure that the struct has the correct alignment even in
// presence of alignas.
@@ -1671,7 +1671,7 @@ impl CodeGenerator for CompInfo {
if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() {
derives.push("Copy");
- if ctx.options().rust_features().builtin_clone_impls() ||
+ if ctx.options().rust_features().builtin_clone_impls ||
used_template_params.is_some()
{
// FIXME: This requires extra logic if you have a big array in a
@@ -2012,7 +2012,7 @@ impl MethodCodegen for Method {
_ => panic!("How in the world?"),
};
- if let (Abi::ThisCall, false) = (signature.abi(), ctx.options().rust_features().thiscall_abi()) {
+ if let (Abi::ThisCall, false) = (signature.abi(), ctx.options().rust_features().thiscall_abi) {
return;
}
@@ -3183,7 +3183,7 @@ impl TryToRustTy for FunctionSig {
let abi = self.abi();
match abi {
- Abi::ThisCall if !ctx.options().rust_features().thiscall_abi() => {
+ Abi::ThisCall if !ctx.options().rust_features().thiscall_abi => {
warn!("Skipping function with thiscall ABI that isn't supported by the configured Rust target");
Ok(quote::Tokens::new())
}
@@ -3280,7 +3280,7 @@ impl CodeGenerator for Function {
}
let abi = match signature.abi() {
- Abi::ThisCall if !ctx.options().rust_features().thiscall_abi() => {
+ Abi::ThisCall if !ctx.options().rust_features().thiscall_abi => {
warn!("Skipping function with thiscall ABI that isn't supported by the configured Rust target");
return;
}