From 1ce9a4cb0b6e49fe94f2b1e6bac5e3e87b150fd2 Mon Sep 17 00:00:00 2001 From: Jan <66554238+vaporoxx@users.noreply.github.com> Date: Wed, 24 May 2023 22:27:10 +0200 Subject: [PATCH 1/3] feat: implement `DoubleEndedSearcher` for `CharArray[Ref]Searcher` (cherry picked from commit c6ed532bef02e752ea881ab104cacc28e5d06738) --- library/core/src/str/pattern.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/str/pattern.rs b/library/core/src/str/pattern.rs index d5d6d60acf61d..701e61e66157c 100644 --- a/library/core/src/str/pattern.rs +++ b/library/core/src/str/pattern.rs @@ -806,6 +806,8 @@ unsafe impl<'a, const N: usize> ReverseSearcher<'a> for CharArraySearcher<'a, N> searcher_methods!(reverse); } +impl<'a, const N: usize> DoubleEndedSearcher<'a> for CharArraySearcher<'a, N> {} + /// Searches for chars that are equal to any of the [`char`]s in the array. /// /// # Examples @@ -826,6 +828,8 @@ unsafe impl<'a, 'b, const N: usize> ReverseSearcher<'a> for CharArrayRefSearcher searcher_methods!(reverse); } +impl<'a, 'b, const N: usize> DoubleEndedSearcher<'a> for CharArrayRefSearcher<'a, 'b, N> {} + ///////////////////////////////////////////////////////////////////////////// // Impl for &[char] ///////////////////////////////////////////////////////////////////////////// From a6eaabdb1e5f160cb84ead4e129a032ee692783a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Nov 2023 12:06:30 +0100 Subject: [PATCH 2/3] Update to LLVM 17.0.5 (cherry picked from commit 8e2fcc4ca211021d929ca424055b59307a97a8f4) --- src/llvm-project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llvm-project b/src/llvm-project index fef3d7b14ede4..7738295178045 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit fef3d7b14ede45d051dc688aae0bb8c8b02a0566 +Subproject commit 7738295178045041669876bf32b0543ec8319a5c From 271143af72a35df4b1f7bacfee92c65ebeb3bdd2 Mon Sep 17 00:00:00 2001 From: lcnr Date: Fri, 17 Nov 2023 11:03:40 +0000 Subject: [PATCH 3/3] only free lifetimes may get erased (cherry picked from commit 3b0e1d23b7fff6b57a634f529ee19d0d173a95f7) --- library/core/src/mem/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 34534ba3b438b..eef2145288c3d 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -1132,10 +1132,12 @@ impl fmt::Debug for Discriminant { /// /// [Reference]: ../../reference/items/enumerations.html#custom-discriminant-values-for-fieldless-enumerations /// -/// The value of a [`Discriminant`] is independent of any *lifetimes* in `T`. As such, reading -/// or writing a `Discriminant>` as a `Discriminant>` (whether via [`transmute`] or -/// otherwise) is always sound. Note that this is **not** true for other kinds of generic -/// parameters; `Discriminant>` and `Discriminant>` might be incompatible. +/// The value of a [`Discriminant`] is independent of any *free lifetimes* in `T`. As such, +/// reading or writing a `Discriminant>` as a `Discriminant>` (whether via +/// [`transmute`] or otherwise) is always sound. Note that this is **not** true for other kinds +/// of generic parameters and for higher-ranked lifetimes; `Discriminant>` and +/// `Discriminant>` as well as `Discriminant Trait<'a>>>` and +/// `Discriminant>>` may be incompatible. /// /// # Examples ///