We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2285f74 commit 3750fa6Copy full SHA for 3750fa6
assert-instr/src/lib.rs
@@ -234,8 +234,18 @@ pub fn assert(fnptr: usize, expected: &str) {
234
};
235
236
// Find our function in the list of all disassembled functions
237
- let functions = &DISASSEMBLY.get(&sym)
238
- .expect(&format!("failed to find disassembly of {}", sym));
+ let functions = match DISASSEMBLY.get(&sym) {
+ Some(f) => f,
239
+ None => {
240
+ let parts = sym.split("::").collect::<Vec<_>>();
241
+ let part = parts.last().unwrap();
242
+ println!("maybe related functions");
243
+ for f in DISASSEMBLY.keys().filter(|k| k.contains(part)) {
244
+ println!("\t- {}", f);
245
+ }
246
+ panic!("failed to find disassembly of {}", sym);
247
248
+ };
249
assert_eq!(functions.len(), 1);
250
let function = &functions[0];
251
0 commit comments