Trait rustc_expand::base::ResolverExpand [−][src]
pub trait ResolverExpand {
Show methods
fn next_node_id(&mut self) -> NodeId;
fn resolve_dollar_crates(&mut self);
fn visit_ast_fragment_with_placeholders(
&mut self,
expn_id: ExpnId,
fragment: &AstFragment
);
fn register_builtin_macro(&mut self, name: Symbol, ext: SyntaxExtensionKind);
fn expansion_for_ast_pass(
&mut self,
call_site: Span,
pass: AstPass,
features: &[Symbol],
parent_module_id: Option<NodeId>
) -> ExpnId;
fn resolve_imports(&mut self);
fn resolve_macro_invocation(
&mut self,
invoc: &Invocation,
eager_expansion_root: ExpnId,
force: bool
) -> Result<Lrc<SyntaxExtension>, Indeterminate>;
fn check_unused_macros(&mut self);
fn lint_node_id(&self, expn_id: ExpnId) -> NodeId;
fn has_derive_copy(&self, expn_id: ExpnId) -> bool;
fn resolve_derives(
&mut self,
expn_id: ExpnId,
force: bool,
derive_paths: &dyn Fn() -> DeriveResolutions
) -> Result<(), Indeterminate>;
fn take_derive_resolutions(
&mut self,
expn_id: ExpnId
) -> Option<DeriveResolutions>;
fn cfg_accessible(
&mut self,
expn_id: ExpnId,
path: &Path
) -> Result<bool, Indeterminate>;
fn get_proc_macro_quoted_span(&self, krate: CrateNum, id: usize) -> Span;
}Required methods
fn next_node_id(&mut self) -> NodeIdfn resolve_dollar_crates(&mut self)fn visit_ast_fragment_with_placeholders(
&mut self,
expn_id: ExpnId,
fragment: &AstFragment
)fn register_builtin_macro(&mut self, name: Symbol, ext: SyntaxExtensionKind)fn expansion_for_ast_pass(
&mut self,
call_site: Span,
pass: AstPass,
features: &[Symbol],
parent_module_id: Option<NodeId>
) -> ExpnIdfn resolve_imports(&mut self)fn resolve_macro_invocation(
&mut self,
invoc: &Invocation,
eager_expansion_root: ExpnId,
force: bool
) -> Result<Lrc<SyntaxExtension>, Indeterminate>fn check_unused_macros(&mut self)fn lint_node_id(&self, expn_id: ExpnId) -> NodeId
fn lint_node_id(&self, expn_id: ExpnId) -> NodeIdSome parent node that is close enough to the given macro call.
fn has_derive_copy(&self, expn_id: ExpnId) -> bool
fn has_derive_copy(&self, expn_id: ExpnId) -> boolDoes #[derive(...)] attribute with the given ExpnId have built-in Copy inside it?
fn resolve_derives(
&mut self,
expn_id: ExpnId,
force: bool,
derive_paths: &dyn Fn() -> DeriveResolutions
) -> Result<(), Indeterminate>
fn resolve_derives(
&mut self,
expn_id: ExpnId,
force: bool,
derive_paths: &dyn Fn() -> DeriveResolutions
) -> Result<(), Indeterminate>Resolve paths inside the #[derive(...)] attribute with the given ExpnId.
fn take_derive_resolutions(
&mut self,
expn_id: ExpnId
) -> Option<DeriveResolutions>
fn take_derive_resolutions(
&mut self,
expn_id: ExpnId
) -> Option<DeriveResolutions>Take resolutions for paths inside the #[derive(...)] attribute with the given ExpnId
back from resolver.
fn cfg_accessible(
&mut self,
expn_id: ExpnId,
path: &Path
) -> Result<bool, Indeterminate>
fn cfg_accessible(
&mut self,
expn_id: ExpnId,
path: &Path
) -> Result<bool, Indeterminate>Path resolution logic for #[cfg_accessible(path)].
fn get_proc_macro_quoted_span(&self, krate: CrateNum, id: usize) -> Span
fn get_proc_macro_quoted_span(&self, krate: CrateNum, id: usize) -> SpanDecodes the proc-macro quoted span in the specified crate, with the specified id. No caching is performed.