rust/compiler/rustc_expand/src
Matthias Krüger 783778c631
Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov
Experimental feature postfix match

This has a basic experimental implementation for the RFC postfix match (rust-lang/rfcs#3295, #121618). [Liaison is](423301844) ```@scottmcm``` with the lang team's [experimental feature gate process](https://github.com/rust-lang/lang-team/blob/master/src/how_to/experiment.md).

This feature has had an RFC for a while, and there has been discussion on it for a while. It would probably be valuable to see it out in the field rather than continue discussing it. This feature also allows to see how popular postfix expressions like this are for the postfix macros RFC, as those will take more time to implement.

It is entirely implemented in the parser, so it should be relatively easy to remove if needed.

This PR is split in to 5 commits to ease review.

1. The implementation of the feature & gating.
2. Add a MatchKind field, fix uses, fix pretty.
3. Basic rustfmt impl, as rustfmt crashes upon seeing this syntax without a fix.
4. Add new MatchSource to HIR for Clippy & other HIR consumers
2024-03-22 11:36:58 +01:00
..
mbe Rollup merge of #122752 - nnethercote:Interpolated-cleanups, r=petrochenkov 2024-03-21 17:46:49 +01:00
mut_visit rustc_ast: Turn MutVisitor::token_visiting_enabled into a constant 2021-10-18 00:23:24 +03:00
parse Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
tokenstream Add newtype for raw idents 2024-02-20 13:13:29 +00:00
base.rs delay expand macro bang when there has indeterminate path 2024-03-13 16:11:16 +08:00
build.rs Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov 2024-03-22 11:36:58 +01:00
config.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
errors.rs make "expected paren or brace" error translatable 2024-03-20 14:31:05 +02:00
expand.rs Rename ast::StmtKind::Local into ast::StmtKind::Let 2024-03-14 12:42:04 +01:00
lib.rs Rollup merge of #122540 - WaffleLapkin:ununexpected, r=estebank 2024-03-20 05:51:22 +01:00
mbe.rs Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
module.rs Use do yeet () and do yeet _ instead of None? and Err(_)? in compiler 2024-03-15 11:37:42 +00:00
placeholders.rs Give VariantData::Struct named fields, to clairfy recovered. 2023-12-20 00:07:34 +00:00
proc_macro.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
proc_macro_server.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
tests.rs When displaying multispans, ignore empty lines adjacent to ... 2024-03-18 16:25:36 +00:00