mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
hir-ty: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
cb95ee3bc0
commit
d580b2c7bc
8 changed files with 20 additions and 22 deletions
|
@ -133,7 +133,7 @@ fn bit_op() {
|
|||
check_number(r#"const GOAL: i8 = 1 << 7"#, (1i8 << 7) as i128);
|
||||
check_number(r#"const GOAL: i8 = -1 << 2"#, (-1i8 << 2) as i128);
|
||||
check_fail(r#"const GOAL: i8 = 1 << 8"#, |e| {
|
||||
e == ConstEvalError::MirEvalError(MirEvalError::Panic("Overflow in Shl".to_string()))
|
||||
e == ConstEvalError::MirEvalError(MirEvalError::Panic("Overflow in Shl".to_owned()))
|
||||
});
|
||||
check_number(r#"const GOAL: i32 = 100000000i32 << 11"#, (100000000i32 << 11) as i128);
|
||||
}
|
||||
|
@ -2756,7 +2756,7 @@ fn memory_limit() {
|
|||
"#,
|
||||
|e| {
|
||||
e == ConstEvalError::MirEvalError(MirEvalError::Panic(
|
||||
"Memory allocation of 30000000000 bytes failed".to_string(),
|
||||
"Memory allocation of 30000000000 bytes failed".to_owned(),
|
||||
))
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue