rust/clippy_utils/src
Matthias Krüger a580b4e6e0 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](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Postfix.20Match.20Liaison/near/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
..
ast_utils Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
mir Convert TypeVisitor and DefIdVisitor to use VisitorResult 2024-03-05 13:28:15 -05:00
ty/type_certainty hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent} 2024-02-10 12:24:46 +03:00
ast_utils.rs Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov 2024-03-22 11:36:58 +01:00
attrs.rs Merge commit '66c29b973b' into clippy-subtree-update 2024-01-25 19:17:36 +01:00
check_proc_macro.rs Give VariantData::Struct named fields, to clairfy recovered. 2023-12-20 00:07:34 +00:00
comparisons.rs Merge commit 'd9c24d1b1e' into clippyup 2023-07-17 10:22:32 +02:00
consts.rs Merge commit '9d6f41691e' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
diagnostics.rs Merge commit '9d6f41691e' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
eager_or_lazy.rs Merge commit '26ac6aab02' 2024-01-11 17:27:03 +01:00
higher.rs Rename hir::Let into hir::LetExpr 2024-03-20 16:47:11 +01:00
hir_utils.rs Implement macro-based deref!() syntax for deref patterns 2024-03-21 11:42:49 -04:00
lib.rs Merge commit '9d6f41691e' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
macros.rs Merge commit '26ac6aab02' 2024-01-11 17:27:03 +01:00
numeric_literal.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
paths.rs Merge commit '9d6f41691e' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
ptr.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
qualify_min_const_fn.rs Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00
source.rs Merge commit '09ac14c901' into clippyup 2023-11-02 17:35:56 +01:00
str_utils.rs Merge commit '09ac14c901' into clippyup 2023-11-02 17:35:56 +01:00
sugg.rs Merge commit '93f0a9a91f' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
sym_helper.rs Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
ty.rs Bless test fallout (duplicate diagnostics) 2024-03-20 13:00:34 -04:00
usage.rs Merge commit '98363cbf6a' into clippyup 2023-09-12 18:44:06 +02:00
visitors.rs Rename hir::Let into hir::LetExpr 2024-03-20 16:47:11 +01:00