Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Natural-selection1
Copy link
Contributor

Apply De Morgan's law

fn f() { (x ||$0 !y).then_some(42) }

before this PR:

fn f() { !(!x && y).then_some(42) } // syntax error

after

fn f() { (!(!x && y)).then_some(42) }

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 5, 2025
@Veykril
Copy link
Member

Veykril commented Nov 6, 2025

Thanks!

Merged via the queue into rust-lang:master with commit 4bf516e Nov 6, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 6, 2025
@Natural-selection1 Natural-selection1 deleted the demorgan branch November 6, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants