[arithmetic_side_effect]: allow different rhs type
This commit is contained in:
parent
3be3fb7231
commit
c5fc61ca94
2 changed files with 7 additions and 2 deletions
|
|
@ -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"];
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue