mirror of
https://github.com/topjohnwu/cxx.git
synced 2025-02-23 09:30:45 +00:00
Merge pull request #560 from dtolnay/relocatable
Mark all shared structs as relocatable
This commit is contained in:
commit
665b7f5b6c
@ -233,9 +233,7 @@ fn write_struct<'a>(out: &mut OutFile<'a>, strct: &'a Struct, methods: &[&Extern
|
||||
writeln!(out, "{};", field.ident);
|
||||
}
|
||||
|
||||
if !methods.is_empty() || operator_eq || operator_ord {
|
||||
writeln!(out);
|
||||
}
|
||||
writeln!(out);
|
||||
|
||||
for method in methods {
|
||||
write!(out, " ");
|
||||
@ -281,6 +279,9 @@ fn write_struct<'a>(out: &mut OutFile<'a>, strct: &'a Struct, methods: &[&Extern
|
||||
);
|
||||
}
|
||||
|
||||
out.include.type_traits = true;
|
||||
writeln!(out, " using IsRelocatable = ::std::true_type;");
|
||||
|
||||
writeln!(out, "}};");
|
||||
writeln!(out, "#endif // {}", guard);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user