mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +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
|
@ -51,9 +51,7 @@ mod tests {
|
|||
fn works_when_wrapped() {
|
||||
check(
|
||||
r#"
|
||||
macro_rules! format_args {
|
||||
($lit:literal $(tt:tt)*) => { 0 },
|
||||
}
|
||||
//- minicore: fmt
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => (std::io::_print(format_args!($($arg)*)));
|
||||
}
|
||||
|
@ -70,9 +68,7 @@ fn main() {
|
|||
fn no_completion_without_brace() {
|
||||
check(
|
||||
r#"
|
||||
macro_rules! format_args {
|
||||
($lit:literal $(tt:tt)*) => { 0 },
|
||||
}
|
||||
//- minicore: fmt
|
||||
fn main() {
|
||||
let foobar = 1;
|
||||
format_args!("f$0");
|
||||
|
@ -87,18 +83,13 @@ fn main() {
|
|||
check_edit(
|
||||
"foobar",
|
||||
r#"
|
||||
macro_rules! format_args {
|
||||
($lit:literal $(tt:tt)*) => { 0 },
|
||||
}
|
||||
//- minicore: fmt
|
||||
fn main() {
|
||||
let foobar = 1;
|
||||
format_args!("{f$0");
|
||||
}
|
||||
"#,
|
||||
r#"
|
||||
macro_rules! format_args {
|
||||
($lit:literal $(tt:tt)*) => { 0 },
|
||||
}
|
||||
fn main() {
|
||||
let foobar = 1;
|
||||
format_args!("{foobar");
|
||||
|
@ -108,18 +99,13 @@ fn main() {
|
|||
check_edit(
|
||||
"foobar",
|
||||
r#"
|
||||
macro_rules! format_args {
|
||||
($lit:literal $(tt:tt)*) => { 0 },
|
||||
}
|
||||
//- minicore: fmt
|
||||
fn main() {
|
||||
let foobar = 1;
|
||||
format_args!("{$0");
|
||||
}
|
||||
"#,
|
||||
r#"
|
||||
macro_rules! format_args {
|
||||
($lit:literal $(tt:tt)*) => { 0 },
|
||||
}
|
||||
fn main() {
|
||||
let foobar = 1;
|
||||
format_args!("{foobar");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue