aboutsummaryrefslogtreecommitdiff
path: root/gen/src
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2022-10-15 13:48:58 -0700
committerDavid Tolnay <dtolnay@gmail.com>2022-10-15 13:54:08 -0700
commit1b33345a6ea1eabe09fa982386f0d4b5d2fd8176 (patch)
tree9b3724408a7e30d9e01a737b1a080362b9f5dbf9 /gen/src
parenteae047748451fa7cc8d0409292ee2cf538428752 (diff)
downloadcxx-1b33345a6ea1eabe09fa982386f0d4b5d2fd8176.tar.gz
Move rust::repr out of anonymous namespace
This will be needed to use PtrLen in the implementation of a Fail functor in cxx.cc.
Diffstat (limited to 'gen/src')
-rw-r--r--gen/src/builtin.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/gen/src/builtin.rs b/gen/src/builtin.rs
index 7ee91c56..1d2c9ec4 100644
--- a/gen/src/builtin.rs
+++ b/gen/src/builtin.rs
@@ -262,8 +262,6 @@ pub(super) fn write(out: &mut OutFile) {
writeln!(out, "}};");
}
- out.begin_block(Block::AnonymousNamespace);
-
if builtin.repr_fat {
include.array = true;
include.cstdint = true;
@@ -284,6 +282,8 @@ pub(super) fn write(out: &mut OutFile) {
out.end_block(Block::Namespace("repr"));
}
+ out.begin_block(Block::AnonymousNamespace);
+
if builtin.rust_str_new_unchecked || builtin.rust_str_repr {
out.next_section();
writeln!(out, "template <>");