Skip to main content

wowlab_tidy/languages/rust/rules/macros/
support.rs

1use ra_ap_syntax::ast;
2
3pub(super) fn is_quote_call(call: &ast::MacroCall) -> bool {
4    let name = call
5        .path()
6        .and_then(|path| path.segment())
7        .and_then(|segment| segment.name_ref());
8
9    name.is_some_and(|name| matches!(name.text().as_str(), "quote" | "quote_spanned"))
10}