diff --git a/include/cxx.h b/include/cxx.h index 2ffacc53..f7decd80 100644 --- a/include/cxx.h +++ b/include/cxx.h @@ -132,8 +132,7 @@ public: T *operator->() noexcept { return this->ptr; } T &operator*() noexcept { return *this->ptr; } - template - static Box in_place(Fields&&... fields) { + template static Box in_place(Fields &&... fields) { Box box; box.uninit(); ::new (box.ptr) T{std::forward(fields)...}; diff --git a/src/cxx.cc b/src/cxx.cc index 8834581c..e8ec979d 100644 --- a/src/cxx.cc +++ b/src/cxx.cc @@ -5,8 +5,7 @@ #include #include -template -[[noreturn]] static void panic(const char *msg) { +template static void panic [[noreturn]] (const char *msg) { #if defined(RUST_CXX_NO_EXCEPTIONS) std::cerr << "Error: " << msg << ". Aborting." << std::endl; std::terminate();