Function span_contains_non_whitespace

Source
pub fn span_contains_non_whitespace(
    cx: &impl HasSession,
    span: Span,
    skip_comments: bool,
) -> bool
Expand description

Checks whether a given span has any significant token. A significant token is a non-whitespace token, including comments unless skip_comments is set. This is useful to determine if there are any actual code tokens in the span that are omitted in the late pass, such as platform-specific code.