about summary refs log tree commit diff
path: root/library/core/src/prelude/v1.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-03-20 16:53:50 -0400
committerMichael Goulet <michael@errs.io>2024-03-21 11:42:49 -0400
commit2d633317f30dd02895f167b65dc1feeee0d08265 (patch)
tree50b3622db66615853ae53baa9c54d968f01e413b /library/core/src/prelude/v1.rs
parent2627e9f3012a97d3136b3e11bf6bd0853c38a534 (diff)
downloadrust-2d633317f30dd02895f167b65dc1feeee0d08265.tar.gz
rust-2d633317f30dd02895f167b65dc1feeee0d08265.zip
Implement macro-based deref!() syntax for deref patterns
Stop using `box PAT` syntax for deref patterns, as it's misleading and
also causes their semantics being tangled up.
Diffstat (limited to 'library/core/src/prelude/v1.rs')
-rw-r--r--library/core/src/prelude/v1.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/core/src/prelude/v1.rs b/library/core/src/prelude/v1.rs
index 10525a16f3a..29f73bb4942 100644
--- a/library/core/src/prelude/v1.rs
+++ b/library/core/src/prelude/v1.rs
@@ -103,3 +103,11 @@ pub use crate::macros::builtin::cfg_eval;
     reason = "placeholder syntax for type ascription"
 )]
 pub use crate::macros::builtin::type_ascribe;
+
+#[cfg(not(bootstrap))]
+#[unstable(
+    feature = "deref_patterns",
+    issue = "87121",
+    reason = "placeholder syntax for deref patterns"
+)]
+pub use crate::macros::builtin::deref;