Skip to content

Commit ec5236f

Browse files
committed
test: use 4 spaces for indetation in macro expansion
1 parent 4896626 commit ec5236f

File tree

4 files changed

+41
-41
lines changed

4 files changed

+41
-41
lines changed

crates/ide-assists/src/handlers/inline_call.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,8 +1348,8 @@ macro_rules! define_foo {
13481348
define_foo!();
13491349
fn bar() -> u32 {
13501350
{
1351-
let x = 0;
1352-
x
1351+
let x = 0;
1352+
x
13531353
}
13541354
}
13551355
"#,
@@ -1662,7 +1662,7 @@ fn main() {
16621662
let a: A = A{};
16631663
let b = {
16641664
let a = a;
1665-
a as A
1665+
a as A
16661666
};
16671667
}
16681668
"#,
@@ -1781,7 +1781,7 @@ fn _hash2(self_: &u64, state: &mut u64) {
17811781
{
17821782
let inner_self_: &u64 = &self_;
17831783
let state: &mut u64 = state;
1784-
_write_u64(state, *inner_self_)
1784+
_write_u64(state, *inner_self_)
17851785
};
17861786
}
17871787
"#,

crates/ide-assists/src/handlers/inline_macro.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ macro_rules! foo {
288288
}
289289
fn main() {
290290
cfg_if!{
291-
if #[cfg(test)]{
292-
1;
293-
}else {
294-
1;
295-
}
291+
if #[cfg(test)]{
292+
1;
293+
}else {
294+
1;
295+
}
296296
};
297297
}
298298
"#,

crates/ide/src/expand_macro.rs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ f$0oo!();
308308
expect![[r#"
309309
foo!
310310
fn some_thing() -> u32 {
311-
let a = 0;
312-
a+10
311+
let a = 0;
312+
a+10
313313
}"#]],
314314
);
315315
}
@@ -342,13 +342,13 @@ fn main() {
342342
expect![[r#"
343343
match_ast!
344344
{
345-
if let Some(it) = ast::TraitDef::cast(container.clone()){}
346-
else if let Some(it) = ast::ImplDef::cast(container.clone()){}
347-
else {
348-
{
349-
continue
345+
if let Some(it) = ast::TraitDef::cast(container.clone()){}
346+
else if let Some(it) = ast::ImplDef::cast(container.clone()){}
347+
else {
348+
{
349+
continue
350+
}
350351
}
351-
}
352352
}"#]],
353353
);
354354
}
@@ -397,12 +397,12 @@ fn main() {
397397
expect![[r#"
398398
foo!
399399
{
400-
macro_rules! bar {
401-
() => {
402-
42
400+
macro_rules! bar {
401+
() => {
402+
42
403+
}
403404
}
404-
}
405-
42
405+
42
406406
}"#]],
407407
);
408408
}
@@ -482,16 +482,16 @@ struct Foo {}
482482
expect![[r#"
483483
Clone
484484
impl < >$crate::clone::Clone for Foo< >where {
485-
fn clone(&self) -> Self {
486-
match self {
487-
Foo{}
488-
=> Foo{}
489-
,
485+
fn clone(&self) -> Self {
486+
match self {
487+
Foo{}
488+
=> Foo{}
489+
,
490490
491-
}
492-
}
491+
}
492+
}
493493
494-
}"#]],
494+
}"#]],
495495
);
496496
}
497497

@@ -534,16 +534,16 @@ struct Foo {}
534534
expect![[r#"
535535
Clone
536536
impl < >$crate::clone::Clone for Foo< >where {
537-
fn clone(&self) -> Self {
538-
match self {
539-
Foo{}
540-
=> Foo{}
541-
,
537+
fn clone(&self) -> Self {
538+
match self {
539+
Foo{}
540+
=> Foo{}
541+
,
542542
543-
}
544-
}
543+
}
544+
}
545545
546-
}"#]],
546+
}"#]],
547547
);
548548
}
549549
}

crates/ide/src/hover/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6341,8 +6341,8 @@ fn main() { $0V; }
63416341
63426342
```rust
63436343
pub const V: i8 = {
6344-
let e = 123;
6345-
f(e)
6344+
let e = 123;
6345+
f(e)
63466346
}
63476347
```
63486348
"#]],
@@ -6368,7 +6368,7 @@ fn main() { $0V; }
63686368
63696369
```rust
63706370
pub static V: i8 = {
6371-
let e = 123;
6371+
let e = 123;
63726372
}
63736373
```
63746374
"#]],

0 commit comments

Comments
 (0)