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

Method should_append_location

cranelift/srcgen/src/lib.rs:71–76  ·  view source on GitHub ↗

Determine if a [`FileLocation`] comment should be appended to a line.

(&self, line: &str)

Source from the content-addressed store, hash-verified

69impl Language {
70 /// Determine if a [`FileLocation`] comment should be appended to a line.
71 pub fn should_append_location(&self, line: &str) -> bool {
72 match self {
73 Language::Rust => !line.ends_with(['{', '}']),
74 Language::Isle => true,
75 }
76 }
77
78 /// Get the comment token for the language.
79 pub fn comment_token(&self) -> &'static str {

Callers 1

line_with_locationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected