about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-02 08:28:08 +0100
committerGitHub <noreply@github.com>2022-12-02 08:28:08 +0100
commit4fdc3eb1761ee50961e4da67b7ccda9d971f5f20 (patch)
tree35a63eba9df0b84ac789cdd4c258ab2ff7117e08 /library/std
parent11663b1b4857ffeafbd85a9a36c234d117373b76 (diff)
parentefea79ca80289be333bf6052015c645b19a32132 (diff)
Rollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8Ki
Add `type_ascribe!` macro as placeholder syntax for type ascription

This makes it still possible to test the internal semantics of type ascription even once the `:`-syntax is removed from the parser. The macro now gets used in a bunch of UI tests that test the semantics and not syntax of type ascription.

I might have forgotten a few tests but this should hopefully be most of them. The remaining ones will certainly be found once type ascription is removed from the parser altogether.

Part of #101728
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/prelude/v1.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/prelude/v1.rs b/library/std/src/prelude/v1.rs
index d5ac16e6b94..a5a798078eb 100644
--- a/library/std/src/prelude/v1.rs
+++ b/library/std/src/prelude/v1.rs
@@ -85,6 +85,15 @@ pub use core::prelude::v1::cfg_accessible;
 )]
 pub use core::prelude::v1::cfg_eval;
 
+// Do not `doc(no_inline)` either.
+#[unstable(
+    feature = "type_ascription",
+    issue = "23416",
+    reason = "placeholder syntax for type ascription"
+)]
+#[cfg(not(bootstrap))]
+pub use core::prelude::v1::type_ascribe;
+
 // The file so far is equivalent to src/libcore/prelude/v1.rs,
 // and below to src/liballoc/prelude.rs.
 // Those files are duplicated rather than using glob imports