From: Arthur Cohen Date: Wed, 28 Jun 2023 14:21:05 +0000 (+0200) Subject: gccrs: expected: Adapt type to GCC's requirements. X-Git-Tag: basepoints/gcc-15~2372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=578068682130e6a438ef2c43692a51415fa1e6b1;p=thirdparty%2Fgcc.git gccrs: expected: Adapt type to GCC's requirements. Disable exceptions and remove inclusion of poisoned headers. gcc/rust/ChangeLog: * util/expected.h: Adapt class to GCC requirements. --- diff --git a/gcc/rust/util/expected.h b/gcc/rust/util/expected.h index cbefafc9481b..a7ddd55a88d9 100644 --- a/gcc/rust/util/expected.h +++ b/gcc/rust/util/expected.h @@ -1,3 +1,4 @@ +// clang-format off /// // expected - An implementation of std::expected with extensions // Written in 2017 by Sy Brand (tartanllama@gmail.com, @TartanLlama) @@ -20,10 +21,7 @@ #define TL_EXPECTED_VERSION_MINOR 1 #define TL_EXPECTED_VERSION_PATCH 0 -#include -#include -#include -#include +#include "rust-system.h" #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) #define TL_EXPECTED_EXCEPTIONS_ENABLED @@ -215,9 +213,7 @@ template #else (void)e; #ifdef _MSC_VER - __assume(0); -#else - __builtin_unreachable(); + gcc_unreachable(); #endif #endif }