Skip to content

Commit 7568b84

Browse files
committed
explain that this does not allow any new code
1 parent e2ac2c6 commit 7568b84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

text/0000-constants-in-patterns.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
When a constant appears as a pattern, this is syntactic sugar for writing a pattern that corresponds to the constant's value by hand.
1010
This operation is only allowed when (a) the type of the constant implements `PartialEq`, and (b) the *value* of the constant being matched on has "structural equality", which means that `PartialEq` behaves the same way as that desugared pattern.
1111

12+
This RFC does not allow any new code, compared to what already builds on stable today.
13+
Its purpose is to explain the rules for constants in patterns in one coherent document,
14+
and to justify why we will start *rejecting* some code that currently works (see the [breaking changes](#breaking-changes) below).
15+
1216
# Motivation
1317
[motivation]: #motivation
1418

0 commit comments

Comments
 (0)