diff options
| author | Josh Stone <cuviper@gmail.com> | 2019-03-27 18:15:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-27 18:15:38 -0700 |
| commit | 1e9e80fd91ef6c5b3b16985682c10bc1ca10e517 (patch) | |
| tree | b5f3a8fbed5f16e13e8f76c1abb73ad2c231d07a /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 99f6de759eea81773d3f97e37334e54f20457c06 (diff) | |
| parent | ce1c5e0a61ab05bd0a944e27c91e2001844516d9 (diff) | |
| download | rust-1e9e80fd91ef6c5b3b16985682c10bc1ca10e517.tar.gz rust-1e9e80fd91ef6c5b3b16985682c10bc1ca10e517.zip | |
Rollup merge of #59439 - Centril:generalize-assign-to-bool-diagnostic, r=oli-obk
Generalize diagnostic for `x = y` where `bool` is the expected type
Extracted out of https://github.com/rust-lang/rust/pull/59288.
Currently we special case a diagnostic for `if x = y { ...` since the expected type is `bool` in this case and we instead suggest `if x == y`. This PR generalizes this such that given an expression of form `x = y` (`ExprKind::Assign(..)`) where the expected type is `bool`, we emit a suggestion `x == y`.
r? @oli-obk
Let's do a perf run to make sure this was not the source of regressions in #59288.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
