MCPcopy Create free account
hub / github.com/astral-sh/ruff / fmt

Method fmt

crates/ty_python_core/src/ast_node_ref.rs:125–137  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

123 for<'ast> &'ast T: TryFrom<AnyRootNodeRef<'ast>>,
124{
125 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
126 cfg_select! {
127 debug_assertions => f
128 .debug_struct("AstNodeRef")
129 .field("kind", &self.kind)
130 .field("range", &self.range)
131 .finish(),
132 _ => {
133 // Unfortunately we have no access to the AST here.
134 f.debug_tuple("AstNodeRef").finish_non_exhaustive()
135 }
136 }
137 }
138}
139
140#[cfg(all(test, debug_assertions))]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected