forked from rust-lang/rustfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compare code block line indentation with config whitespace (rust-lang…
…#4166) Previously the indetation of a line was compared with the configured number of spaces per tab, which could cause lines that were formatted with hard tabs not to be recognized as indented ("\t".len() < " ".len()). Closes rust-lang#4152
- Loading branch information
1 parent
e7ecdc1
commit cfdeced
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// rustfmt-hard_tabs: true | ||
|
||
macro_rules! bit { | ||
($bool:expr) => { | ||
if $bool { | ||
1; | ||
1 | ||
} else { | ||
0; | ||
0 | ||
} | ||
}; | ||
} | ||
macro_rules! add_one { | ||
($vec:expr) => {{ | ||
$vec.push(1); | ||
}}; | ||
} |