about summary refs log tree commit diff
path: root/src/test/ui/numeric/numeric-cast-binop.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-320/+0
2020-06-11fixup! Provide suggestion to convert numeric op LHS rather than unwrapping RHSAyaz Hafiz-6/+11
2020-06-11Provide suggestion to convert numeric op LHS rather than unwrapping RHSAyaz Hafiz-0/+315
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