Emit builtin#format_args in builtin format_args expander

This commit is contained in:
Lukas Wirth 2023-09-06 18:00:30 +02:00
parent 5fdd1e36e3
commit c0e402637e
15 changed files with 146 additions and 341 deletions

View file

@ -6574,3 +6574,23 @@ fn test() {
"#]],
);
}
#[test]
fn format_args_arg() {
check(
r#"
//- minicore: fmt
fn test() {
let foo = 0;
format_args!("{}", foo$0);
}
"#,
expect![[r#"
*foo*
```rust
let foo: i32 // size = 4, align = 4
```
"#]],
);
}