Format with clangfmt

This commit is contained in:
David Tolnay 2020-04-11 22:06:00 -07:00
parent a3d92bf992
commit c2279000a9
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 2 additions and 4 deletions

View File

@ -132,8 +132,7 @@ public:
T *operator->() noexcept { return this->ptr; } T *operator->() noexcept { return this->ptr; }
T &operator*() noexcept { return *this->ptr; } T &operator*() noexcept { return *this->ptr; }
template <typename... Fields> template <typename... Fields> static Box in_place(Fields &&... fields) {
static Box in_place(Fields&&... fields) {
Box box; Box box;
box.uninit(); box.uninit();
::new (box.ptr) T{std::forward<Fields>(fields)...}; ::new (box.ptr) T{std::forward<Fields>(fields)...};

View File

@ -5,8 +5,7 @@
#include <memory> #include <memory>
#include <stdexcept> #include <stdexcept>
template <typename Exception> template <typename Exception> static void panic [[noreturn]] (const char *msg) {
[[noreturn]] static void panic(const char *msg) {
#if defined(RUST_CXX_NO_EXCEPTIONS) #if defined(RUST_CXX_NO_EXCEPTIONS)
std::cerr << "Error: " << msg << ". Aborting." << std::endl; std::cerr << "Error: " << msg << ". Aborting." << std::endl;
std::terminate(); std::terminate();