about summary refs log tree commit diff
path: root/library/std/src/sys/windows/stack_overflow_uwp.rs
diff options
context:
space:
mode:
authorAyaz Hafiz <ayaz.hafiz.1@gmail.com>2020-06-09 11:45:40 -0700
committerAyaz Hafiz <ayaz.hafiz.1@gmail.com>2020-06-11 09:04:24 -0700
commite243f623174e661e7e2392eb234a0af9ce9129cd (patch)
treea1b5c451a08651cda180c8d4f94d505293b3f671 /library/std/src/sys/windows/stack_overflow_uwp.rs
parent50c0192c64241d723066add22c53d472e2b9cba9 (diff)
downloadrust-e243f623174e661e7e2392eb234a0af9ce9129cd.tar.gz
rust-e243f623174e661e7e2392eb234a0af9ce9129cd.zip
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