Skip to main content

Module render_macro_matchers

Module render_macro_matchers 

Source

Re-exportsΒ§

use rustc_ast::token; πŸ”’
use rustc_ast::token::Delimiter; πŸ”’
use rustc_ast::token::IdentKind; πŸ”’
use rustc_ast::tokenstream::TokenStream; πŸ”’
use rustc_ast::tokenstream::TokenTree; πŸ”’
use rustc_ast_pretty::pprust::PrintState; πŸ”’
use rustc_ast_pretty::pprust::state::State as Printer; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_parse::lexer::StripTokens; πŸ”’
use rustc_session::parse::ParseSess; πŸ”’
use rustc_span::symbol::Ident; πŸ”’
use rustc_span::symbol::Symbol; πŸ”’
use rustc_span::symbol::kw; πŸ”’
use rustc_span::FileName; πŸ”’
use rustc_span::Span; πŸ”’

FunctionsΒ§

print_tt πŸ”’
print_tts πŸ”’
render_macro_matcher πŸ”’
Render a macro matcher in a format suitable for displaying to the user as part of an item declaration.
snippet_equal_to_token πŸ”’
Find the source snippet for this token’s Span, reparse it, and return the snippet if the reparsed TokenTree matches the argument TokenTree.
usually_needs_space_between_keyword_and_open_delim πŸ”’