MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / print_arrow

Function print_arrow

cranelift/codegen/src/print_errors.rs:191–204  ·  view source on GitHub ↗

Prints: ; ^~~~~~

(w: &mut dyn Write, entity: &str)

Source from the content-addressed store, hash-verified

189/// Prints:
190/// ; ^~~~~~
191fn print_arrow(w: &mut dyn Write, entity: &str) -> fmt::Result {
192 write!(w, ";")?;
193
194 let indent = entity.len() - entity.trim_start().len();
195 if indent != 0 {
196 write!(w, "{1:0$}^", indent - 1, "")?;
197 }
198
199 for _ in 0..entity.trim().len() - 1 {
200 write!(w, "~")?;
201 }
202
203 writeln!(w)
204}
205
206/// Prints:
207/// ; error: [ERROR BODY]

Callers 3

pretty_instruction_errorFunction · 0.85
pretty_preamble_errorFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected