about summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-26 21:23:48 +0100
committerGitHub <noreply@github.com>2024-03-26 21:23:48 +0100
commit0029a11d7d3114daa4bbfaad835be89ce0635e58 (patch)
tree7ad2610ed3b31c339ca86ca393b4f4c5221b16b0 /library/alloc/src/string.rs
parent20770ac3fc019dcb5c326ce067a636a6b794a0ac (diff)
parentfc1d7d275ba11e37cf9962f0126ca9ed54b137b4 (diff)
downloadrust-0029a11d7d3114daa4bbfaad835be89ce0635e58.tar.gz
rust-0029a11d7d3114daa4bbfaad835be89ce0635e58.zip
Rollup merge of #122835 - compiler-errors:deref-pure, r=Nadrieril
Require `DerefMut` and `DerefPure` on `deref!()` patterns when appropriate

Waiting on the deref pattern syntax pr to merge

r? nadrieril
Diffstat (limited to 'library/alloc/src/string.rs')
-rw-r--r--library/alloc/src/string.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index 7dba5b4e1f9..7464df268cc 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -2479,6 +2479,9 @@ impl ops::Deref for String {
     }
 }
 
+#[unstable(feature = "deref_pure_trait", issue = "87121")]
+unsafe impl ops::DerefPure for String {}
+
 #[stable(feature = "derefmut_for_string", since = "1.3.0")]
 impl ops::DerefMut for String {
     #[inline]