about summary refs log tree commit diff
path: root/library/std/src/sys/windows/stack_overflow_uwp.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-06-12 00:05:33 +0200
committerGitHub <noreply@github.com>2020-06-12 00:05:33 +0200
commit7bdf7d09b03f8664e02cd1d80972ea7b1c96a4d5 (patch)
treec0b775c88d0eed84610bb103971e9fe10bbf7eed /library/std/src/sys/windows/stack_overflow_uwp.rs
parent838d25b5e3cfabce609d9b9cb22653c4961d94b7 (diff)
parent0c02f8aea9d8b26ad0e02a8ba1333a794844e146 (diff)
downloadrust-7bdf7d09b03f8664e02cd1d80972ea7b1c96a4d5.tar.gz
rust-7bdf7d09b03f8664e02cd1d80972ea7b1c96a4d5.zip
Rollup merge of #73195 - ayazhafiz:i/73145, r=estebank
Provide suggestion to convert numeric op LHS rather than unwrapping RHS

Given a code

```rust
fn foo(x: u8, y: u32) -> bool {
    x > y
}
fn main() {}
```

it could be more helpful to provide a suggestion to do "u32::from(x)"
rather than "y.try_into().unwrap()", since the latter may panic.

We do this by passing the LHS of a binary expression up the stack into
the coercion checker.

Closes #73145
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow_uwp.rs')
0 files changed, 0 insertions, 0 deletions