mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Emit builtin#format_args in builtin format_args expander
This commit is contained in:
parent
5fdd1e36e3
commit
c0e402637e
15 changed files with 146 additions and 341 deletions
|
@ -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
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue