about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorJosh Stone <cuviper@gmail.com>2019-03-27 18:15:38 -0700
committerGitHub <noreply@github.com>2019-03-27 18:15:38 -0700
commit1e9e80fd91ef6c5b3b16985682c10bc1ca10e517 (patch)
treeb5f3a8fbed5f16e13e8f76c1abb73ad2c231d07a /src/libstd/sys/unix/stack_overflow.rs
parent99f6de759eea81773d3f97e37334e54f20457c06 (diff)
parentce1c5e0a61ab05bd0a944e27c91e2001844516d9 (diff)
downloadrust-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