]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #64342 - glorv:master, r=varkor
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 21 Sep 2019 14:01:26 +0000 (16:01 +0200)
committerGitHub <noreply@github.com>
Sat, 21 Sep 2019 14:01:26 +0000 (16:01 +0200)
commitd021dba048acb79b74640f8678ecfa557d49dd8a
tree057d06f90ccbd0992f1e9393e7accdacdb94ee2c
parentd7e511add665c4f22ad259e64a241b296af0ef8c
parent1ab5593f951c07a6f0ed05fbbfe8f262863158a0
Rollup merge of #64342 - glorv:master, r=varkor

factor out pluralisation remains after #64280

there are two case that doesn't not match the original macro pattern at [here](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/unused.rs#L146) and [here](https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/diagnostics.rs#L539) as the provided param is already a bool or the check condition is not `x != 1`, so I change the macro accept a boolean expr instead of number to fit all the cases.

@Centril  please review

Fixes #64238.
src/librustc/traits/error_reporting.rs
src/librustc_typeck/check/expr.rs
src/librustc_typeck/check/mod.rs