mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Fuse multiple str::replace invocations into a single one
This commit is contained in:
committed by
Amanieu d'Antras
parent
5cdd9f81ce
commit
fd9370dd44
@@ -61,9 +61,7 @@ pub fn assert_instr(
|
||||
}
|
||||
|
||||
let instr_str = instr
|
||||
.replace('.', "_")
|
||||
.replace('/', "_")
|
||||
.replace(':', "_")
|
||||
.replace(['.', '/', ':'], "_")
|
||||
.replace(char::is_whitespace, "");
|
||||
let assert_name = syn::Ident::new(&format!("assert_{name}_{instr_str}"), name.span());
|
||||
// These name has to be unique enough for us to find it in the disassembly later on:
|
||||
|
||||
Reference in New Issue
Block a user