Files
rust/tests/ui/pattern
Matthias Krüger 193a28d9b4 Rollup merge of #144006 - dianne:match-ergonomics-jargon, r=Nadrieril
clarify wording of match ergonomics diagnostics (`rust_2024_incompatible_pat` lint and error)

Partially addresses rust-lang/rust#143557:
- Uses different wording than the Edition Guide chapter, to hopefully stand alone a bit better. Instead of referring to the "default binding mode", it now talks about what can't be written "within elided reference patterns". I ended up going with "elided" instead of "implicit" in hope that it reads bit less like it should behave the same as an explicit reference pattern, but I'm not totally happy with that wording.
- The explanatory note still points to where the default binding mode was introduced, but only refers to its effect, not what we call it. How that relates to the rest of the diagnostic may still be a bit of a puzzle, but hopefully it isn't too much of one? It also doesn't make sense anymore for the case of `&` written under a by-ref binding mode, so I've left the note out in that case (but kept the label). It's more cramped, but talking about binding modes would feel like a non-sequitur for the error about `&` patterns without further explanation.
- Links to the stable version of the Edition Guide instead of the nightly version. It looks like almost every link to the Edition Guide in diagnostics is to the nightly version, presumably for the same reason as here: the diagnostics were added before the new Edition was stabilized, then never updated. I'll make a separate PR to clean up the others.

This only changes the diagnostic messages, not the code suggestion or the Edition Guide.

r? `@Nadrieril` or reassign
2025-10-08 15:39:25 +02:00
..
2025-05-03 17:22:52 +02:00
2025-08-05 19:34:46 +05:00
2025-08-05 19:34:46 +05:00
2025-08-09 16:27:20 +05:00
2024-02-09 15:43:08 -03:00
2024-02-09 15:43:08 -03:00
2024-04-29 14:53:38 +02:00
2024-03-27 11:20:28 -04:00
2025-08-09 16:27:20 +05:00
2024-11-21 18:40:36 +08:00
2024-11-21 18:40:36 +08:00
2025-06-11 15:30:15 +01:00
2025-08-09 16:27:20 +05:00
2025-08-09 16:27:20 +05:00
2025-08-09 16:27:20 +05:00
2025-08-05 19:34:46 +05:00
2025-08-05 19:34:46 +05:00
2025-08-09 16:27:20 +05:00