From 54ef40b91624cc9f20b7277981a05f6dce26d014 Mon Sep 17 00:00:00 2001 From: Brian Johnson <34129+bridiver@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:45:51 -0700 Subject: [PATCH] =?UTF-8?q?also=20patch=20cxx=20crate=20from=20https://git?= =?UTF-8?q?hub.com/brave/brave-core/commit/=E2=80=A6=20(#27185)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also patch cxx crate from https://github.com/brave/brave-core/commit/a22fc313b5c250154b09b1d12fb5132cba62c24f Change presubmit patch empty line to error to allow upstream patches that do not comply with Brave patching standards --- patches/PRESUBMIT.py | 2 +- ..._io-vendor-cxx-1.0.129-include-cxx.h.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 patches/third_party-rust-chromium_crates_io-vendor-cxx-1.0.129-include-cxx.h.patch diff --git a/patches/PRESUBMIT.py b/patches/PRESUBMIT.py index 1a9006278f7b..a01018b6db4e 100644 --- a/patches/PRESUBMIT.py +++ b/patches/PRESUBMIT.py @@ -42,7 +42,7 @@ def CheckPatchFile(input_api, output_api): return [] return [ - output_api.PresubmitError( + output_api.PresubmitPromptWarning( 'Patch should not add or remove empty lines at hunk boundaries', items) ] diff --git a/patches/third_party-rust-chromium_crates_io-vendor-cxx-1.0.129-include-cxx.h.patch b/patches/third_party-rust-chromium_crates_io-vendor-cxx-1.0.129-include-cxx.h.patch new file mode 100644 index 000000000000..d24a76516efe --- /dev/null +++ b/patches/third_party-rust-chromium_crates_io-vendor-cxx-1.0.129-include-cxx.h.patch @@ -0,0 +1,25 @@ +diff --git a/third_party/rust/chromium_crates_io/vendor/cxx-1.0.129/include/cxx.h b/third_party/rust/chromium_crates_io/vendor/cxx-1.0.129/include/cxx.h +index 3414e4c8a5434f6d43b8bf7a76e634ac0c7d06a5..03fa9bf730156c0926aef35bcf3fc0a98c98a0db 100644 +--- a/third_party/rust/chromium_crates_io/vendor/cxx-1.0.129/include/cxx.h ++++ b/third_party/rust/chromium_crates_io/vendor/cxx-1.0.129/include/cxx.h +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -244,6 +245,12 @@ public: + bool operator>(const iterator &) const noexcept; + bool operator>=(const iterator &) const noexcept; + ++ using iterator_concept = std::contiguous_iterator_tag; ++ template ++ friend iterator operator+(N n, const iterator &it) noexcept { ++ return it + n; ++ } ++ + private: + friend class Slice; + void *pos;