MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / code_comment_inside

Function code_comment_inside

atomic-audit/src/substantive/rust.rs:143–150  ·  view source on GitHub ↗
(node: Node<'tree>, explains: &impl Fn(Node<'tree>) -> bool)

Source from the content-addressed store, hash-verified

141}
142
143fn code_comment_inside<'tree>(node: Node<'tree>, explains: &impl Fn(Node<'tree>) -> bool) -> bool {
144 // Only direct comments in the unsafe body count, not a nested operation's
145 // unrelated safety note.
146 tokens::named(node).into_iter().any(|child| {
147 explains(child)
148 || (child.kind() == "block" && tokens::named(child).into_iter().any(explains))
149 })
150}
151
152fn forwarding_wrapper(
153 node: Node<'_>,

Callers 1

justifiedFunction · 0.85

Calls 3

namedFunction · 0.50
into_iterMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected