You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression involving "is not a logical operator" in match #75599
The following used to work from rust 1.0.0 through 1.41.0, but has been failing to compile since 1.42.0. I believe the "`and` is not a logical operator" diagnostic is being overzealous and should not be triggering on this program.
mod or {pubconstID:usize = 0;}mod and {pubconstID:usize = 1;}fnmain(){match0{
or::ID => {}
and::ID => {}
_ => {}}}
error: `and` is not a logical operator --> src/main.rs:12:9 |12 | and::ID => {} | ^^^ help: use `&&` to perform logical conjunction | = note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
Activity
dtolnay commentedon Aug 16, 2020
Likely introduced in #66994.
tgnottingham commentedon Aug 17, 2020
@rustbot claim
Rollup merge of rust-lang#75658 - tgnottingham:issue-75599, r=estebank
Rollup merge of rust-lang#75658 - tgnottingham:issue-75599, r=estebank
Rollup merge of rust-lang#75658 - tgnottingham:issue-75599, r=estebank
Rollup merge of rust-lang#75658 - tgnottingham:issue-75599, r=estebank
Don't emit "is not a logical operator" error outside of associative e…