test: use 4 spaces for indetation in macro expansion

This commit is contained in:
roife 2024-02-27 12:23:15 +08:00
parent 48966268fc
commit ec5236f3a8
4 changed files with 41 additions and 41 deletions

View file

@ -1348,8 +1348,8 @@ macro_rules! define_foo {
define_foo!(); define_foo!();
fn bar() -> u32 { fn bar() -> u32 {
{ {
let x = 0; let x = 0;
x x
} }
} }
"#, "#,
@ -1662,7 +1662,7 @@ fn main() {
let a: A = A{}; let a: A = A{};
let b = { let b = {
let a = a; let a = a;
a as A a as A
}; };
} }
"#, "#,
@ -1781,7 +1781,7 @@ fn _hash2(self_: &u64, state: &mut u64) {
{ {
let inner_self_: &u64 = &self_; let inner_self_: &u64 = &self_;
let state: &mut u64 = state; let state: &mut u64 = state;
_write_u64(state, *inner_self_) _write_u64(state, *inner_self_)
}; };
} }
"#, "#,

View file

@ -288,11 +288,11 @@ macro_rules! foo {
} }
fn main() { fn main() {
cfg_if!{ cfg_if!{
if #[cfg(test)]{ if #[cfg(test)]{
1; 1;
}else { }else {
1; 1;
} }
}; };
} }
"#, "#,

View file

@ -308,8 +308,8 @@ f$0oo!();
expect![[r#" expect![[r#"
foo! foo!
fn some_thing() -> u32 { fn some_thing() -> u32 {
let a = 0; let a = 0;
a+10 a+10
}"#]], }"#]],
); );
} }
@ -342,13 +342,13 @@ fn main() {
expect![[r#" expect![[r#"
match_ast! match_ast!
{ {
if let Some(it) = ast::TraitDef::cast(container.clone()){} if let Some(it) = ast::TraitDef::cast(container.clone()){}
else if let Some(it) = ast::ImplDef::cast(container.clone()){} else if let Some(it) = ast::ImplDef::cast(container.clone()){}
else { else {
{ {
continue continue
}
} }
}
}"#]], }"#]],
); );
} }
@ -397,12 +397,12 @@ fn main() {
expect![[r#" expect![[r#"
foo! foo!
{ {
macro_rules! bar { macro_rules! bar {
() => { () => {
42 42
}
} }
} 42
42
}"#]], }"#]],
); );
} }
@ -482,16 +482,16 @@ struct Foo {}
expect![[r#" expect![[r#"
Clone Clone
impl < >$crate::clone::Clone for Foo< >where { impl < >$crate::clone::Clone for Foo< >where {
fn clone(&self) -> Self { fn clone(&self) -> Self {
match self { match self {
Foo{} Foo{}
=> Foo{} => Foo{}
, ,
} }
} }
}"#]], }"#]],
); );
} }
@ -534,16 +534,16 @@ struct Foo {}
expect![[r#" expect![[r#"
Clone Clone
impl < >$crate::clone::Clone for Foo< >where { impl < >$crate::clone::Clone for Foo< >where {
fn clone(&self) -> Self { fn clone(&self) -> Self {
match self { match self {
Foo{} Foo{}
=> Foo{} => Foo{}
, ,
} }
} }
}"#]], }"#]],
); );
} }
} }

View file

@ -6341,8 +6341,8 @@ fn main() { $0V; }
```rust ```rust
pub const V: i8 = { pub const V: i8 = {
let e = 123; let e = 123;
f(e) f(e)
} }
``` ```
"#]], "#]],
@ -6368,7 +6368,7 @@ fn main() { $0V; }
```rust ```rust
pub static V: i8 = { pub static V: i8 = {
let e = 123; let e = 123;
} }
``` ```
"#]], "#]],