]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #68108 - varkor:chained-comparison-suggestions, r=Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 12 Jan 2020 02:28:02 +0000 (03:28 +0100)
committerGitHub <noreply@github.com>
Sun, 12 Jan 2020 02:28:02 +0000 (03:28 +0100)
commit82c19b4388dc671dd4c1224b8577a5e23ff315e4
tree22efe869664863f74b929dcb29f0b28ad2ce25e6
parentbbd210e6c57b23853889dddbdb1564c61a0249f7
parent088a1808d22e571dbf83f477d94ea9c78ccc3219
Rollup merge of #68108 - varkor:chained-comparison-suggestions, r=Centril

Add suggestions when encountering chained comparisons

Ideally, we'd also prevent the type error, which is just extra noise, but that will require moving the error from the parser, and I think the suggestion makes things clear enough for now.

Fixes https://github.com/rust-lang/rust/issues/65659.
src/librustc_parse/parser/diagnostics.rs
src/librustc_parse/parser/expr.rs