Struct clippy_utils::macros::FormatArgsExpn
source · [−]pub struct FormatArgsExpn<'tcx> {
pub format_string_span: Span,
pub format_string_parts: Vec<Symbol>,
pub value_args: Vec<&'tcx Expr<'tcx>>,
pub formatters: Vec<(usize, Symbol)>,
pub specs: Vec<&'tcx Expr<'tcx>>,
}Expand description
A parsed format_args! expansion
Fields
format_string_span: SpanSpan of the first argument, the format string
format_string_parts: Vec<Symbol>The format string split by formatted args like {..}
value_args: Vec<&'tcx Expr<'tcx>>Values passed after the format string
formatters: Vec<(usize, Symbol)>Each element is a value_args index and a formatting trait (e.g. sym::Debug)
specs: Vec<&'tcx Expr<'tcx>>List of fmt::v1::Argument { .. } expressions. If this is empty,
then formatters represents the format args ({..}).
If this is non-empty, it represents the format args, and the position
parameters within the struct expressions are indexes of formatters.
Implementations
Parses an expanded format_args! or format_args_nl! invocation
pub fn find_nested(
cx: &LateContext<'tcx>,
expr: &'tcx Expr<'tcx>,
expn_id: ExpnId
) -> Option<Self>
pub fn find_nested(
cx: &LateContext<'tcx>,
expr: &'tcx Expr<'tcx>,
expn_id: ExpnId
) -> Option<Self>
Finds a nested call to format_args! within a format!-like macro call
Returns a vector of FormatArgsArg.
Span of all inputs
Auto Trait Implementations
impl<'tcx> RefUnwindSafe for FormatArgsExpn<'tcx>
impl<'tcx> !Send for FormatArgsExpn<'tcx>
impl<'tcx> !Sync for FormatArgsExpn<'tcx>
impl<'tcx> Unpin for FormatArgsExpn<'tcx>
impl<'tcx> UnwindSafe for FormatArgsExpn<'tcx>
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes