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
Showing
此差异已折叠。
想要评论请 注册 或 登录