Skip to content

Commit 43ad167

Browse files
author
myrrlyn
committed
Add a lint suggestion to the drawbacks, per review.
1 parent 69175db commit 43ad167

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

text/0000-unless-until.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,13 @@ scope of this RFC.
410410
`until`.
411411

412412
The negative words may lead casual readers to form improper assumptions
413-
about control flow, inducing confusion or stutter when reading in more depth
413+
about control flow, inducing confusion or stutter when reading in more
414+
depth.
415+
416+
If this RFC is accepted, the compiler MAY choose to add a lint warning that
417+
is raised whenever an `unless !` or `unless { a } else { b }` construct is
418+
encountered, and suggest changing them to an `if` or `if { b } else { a }`,
419+
respectively.
414420

415421
- Patterns *cannot* have interior bindings.
416422

0 commit comments

Comments
 (0)