Skip to content

Commit 9f2c2e5

Browse files
committed
extract the formaing string and the values
1 parent 91d099d commit 9f2c2e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_utils/src/higher.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ impl FormatExpn<'tcx> {
534534

535535
/// A parsed `format_args!` expansion
536536
pub struct FormatArgsExpn<'tcx> {
537+
/// The fist argument, the fromat string, as an expr
538+
pub format_string: &'tcx Expr<'tcx>,
537539
/// Span of the first argument, the format string
538540
pub format_string_span: Span,
539541
/// Values passed after the format string
@@ -590,6 +592,7 @@ impl FormatArgsExpn<'tcx> {
590592
if let ExprKind::Array(args) = arm.body.kind;
591593
then {
592594
Some(FormatArgsExpn {
595+
format_string:strs_ref,
593596
format_string_span: strs_ref.span,
594597
value_args,
595598
format_string_parts,

0 commit comments

Comments
 (0)