1
Fork 0

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
This commit is contained in:
Matthias Krüger 2022-12-02 08:28:08 +01:00 committed by GitHub
commit 4fdc3eb176
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 262 additions and 221 deletions

View file

@ -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