Expand description
The implementation of built-in macros which relate to the file system.
Re-exportsยง
use std::path::Path;๐use std::path::PathBuf;๐use std::rc::Rc;๐use std::sync::Arc;๐use rustc_ast as ast;๐use rustc_ast::tokenstream::TokenStream;๐use rustc_ast::join_path_idents;๐use rustc_ast::token;๐use rustc_ast_pretty::pprust;๐use rustc_expand::base::DummyResult;๐use rustc_expand::base::ExpandResult;๐use rustc_expand::base::ExtCtxt;๐use rustc_expand::base::MacEager;๐use rustc_expand::base::MacResult;๐use rustc_expand::base::MacroExpanderResult;๐use rustc_expand::module::DirOwnership;๐use rustc_lint_defs::builtin::INCOMPLETE_INCLUDE;๐use rustc_parse::lexer::StripTokens;๐use rustc_parse::parser::AllowConstBlockItems;๐use rustc_parse::parser::ForceCollect;๐use rustc_parse::new_parser_from_file;๐use rustc_parse::unwrap_or_emit_fatal;๐use rustc_parse::utf8_error;๐use rustc_session::parse::ParseSess;๐use rustc_span::source_map::SourceMap;๐use rustc_span::ByteSymbol;๐use rustc_span::Pos;๐use rustc_span::Span;๐use rustc_span::Symbol;๐use smallvec::SmallVec;๐use crate::diagnostics;๐use crate::util::check_zero_tts;๐use crate::util::get_single_str_from_tts;๐use crate::util::get_single_str_spanned_from_tts;๐use crate::util::parse_expr;๐
Functionsยง
- expand_
column ๐ - Expand
column!()to the current column number. - expand_
file ๐ - Expand
file!()to the current filename. - expand_
include ๐ - Expand
include!($input). - expand_
include_ ๐bytes - Expand
include_bytes!($input)to the content of the file given by path$input. - expand_
include_ ๐str - Expand
include_str!($input)to the content of the UTF-8-encoded file given by path$inputas a string literal. - expand_
line ๐ - Expand
line!()to the current line number. - expand_
mod ๐ - Expand
module_path!()to (a textual representation of) the current module path. - expand_
stringify ๐ - Expand
stringify!($input). - find_
path_ ๐suggestion - load_
binary_ ๐file