about summary refs log tree commit diff
path: root/library/alloc/src/vec/mod.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/vec/mod.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/vec/mod.rs')
-rw-r--r--library/alloc/src/vec/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 94bed825bb2..3062f8664b7 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -2772,6 +2772,9 @@ impl<T, A: Allocator> ops::DerefMut for Vec<T, A> {
     }
 }
 
+#[unstable(feature = "deref_pure_trait", issue = "87121")]
+unsafe impl<T, A: Allocator> ops::DerefPure for Vec<T, A> {}
+
 #[cfg(not(no_global_oom_handling))]
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Clone, A: Allocator + Clone> Clone for Vec<T, A> {