Now that rust-lang/rust#106745 is merged, Clippy has access to the original parsed/processed format_args!() invocation. This hopefully means that Clippy no longer needs to do anything that depends on the exact expansion of format_args!() and implementation details of fmt::Arguments (which will undergo changes in the (near!) future).
Details:
As of rust-lang/rust#106745, the format_args!() builtin macro expands to a special ast::FormatArgs AST node, which contains nothing that is specific to the standard library's fmt::Arguments implementation. During AST lowering, this node is expanded into HIR that is specific to how fmt::Arguments is implemented, and will change in the (near) future.)
Clippy's format_args lints are currently done in late passes that use the HIR. They should be changed to use the information from ast::FormatArgs instead. (Ideally by making them early passes, but that might not always be possible.)
This is part of rust-lang/rust#99012
Lints to migrate:
Now that rust-lang/rust#106745 is merged, Clippy has access to the original parsed/processed format_args!() invocation. This hopefully means that Clippy no longer needs to do anything that depends on the exact expansion of format_args!() and implementation details of fmt::Arguments (which will undergo changes in the (near!) future).
Details:
As of rust-lang/rust#106745, the
format_args!()builtin macro expands to a specialast::FormatArgsAST node, which contains nothing that is specific to the standard library'sfmt::Argumentsimplementation. During AST lowering, this node is expanded into HIR that is specific to howfmt::Argumentsis implemented, and will change in the (near) future.)Clippy's format_args lints are currently done in late passes that use the HIR. They should be changed to use the information from ast::FormatArgs instead. (Ideally by making them early passes, but that might not always be possible.)
This is part of rust-lang/rust#99012
Lints to migrate:
write.rstorustc_ast::FormatArgs#10275format_args.rstorustc_ast::FormatArgs#10484FormatArgsExpn#10561PanicExpn::Format