mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 17:13:48 +00:00
[arithmetic_side_effect
]: allow different rhs type
This commit is contained in:
parent
3be3fb7231
commit
c5fc61ca94
@ -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…
Reference in New Issue
Block a user