[arithmetic_side_effect]: allow different rhs type

This commit is contained in:
y21 2023-07-13 00:24:10 +02:00
parent 3be3fb7231
commit c5fc61ca94
2 changed files with 7 additions and 2 deletions

View File

@ -19,8 +19,8 @@ use rustc_span::{
const HARD_CODED_ALLOWED_BINARY: &[[&str; 2]] = &[
["f32", "f32"],
["f64", "f64"],
["std::num::Saturating", "std::num::Saturating"],
["std::num::Wrapping", "std::num::Wrapping"],
["std::num::Saturating", "*"],
["std::num::Wrapping", "*"],
["std::string::String", "str"],
];
const HARD_CODED_ALLOWED_UNARY: &[&str] = &["f32", "f64", "std::num::Saturating", "std::num::Wrapping"];

View File

@ -481,4 +481,9 @@ pub fn issue_10792() {
let _ = 10 / TWO.c;
}
pub fn issue_11145() {
let mut x: Wrapping<u32> = Wrapping(0_u32);
x += 1;
}
fn main() {}