Skip to content

Commit cf53ffc

Browse files
committed
Cargo fmt
1 parent 48ba5b0 commit cf53ffc

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/cargo-fmt/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn execute() -> i32 {
9797
}
9898

9999
macro_rules! print_usage {
100-
($print: ident, $opts: ident, $reason: expr) => {{
100+
($print:ident, $opts:ident, $reason:expr) => {{
101101
let msg = format!("{}\nusage: cargo fmt [options]", $reason);
102102
$print!(
103103
"{}\nThis utility formats all bin and lib files of the current crate using rustfmt. \

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl Rewrite for MacroArg {
103103

104104
fn parse_macro_arg(parser: &mut Parser) -> Option<MacroArg> {
105105
macro_rules! parse_macro_arg {
106-
($macro_arg: ident, $parser: ident) => {
106+
($macro_arg:ident, $parser:ident) => {
107107
let mut cloned_parser = (*parser).clone();
108108
match cloned_parser.$parser() {
109109
Ok(x) => {

src/spanned.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub trait Spanned {
2020
}
2121

2222
macro_rules! span_with_attrs_lo_hi {
23-
($this: ident, $lo: expr, $hi: expr) => {{
23+
($this:ident, $lo:expr, $hi:expr) => {{
2424
let attrs = outer_attributes(&$this.attrs);
2525
if attrs.is_empty() {
2626
mk_sp($lo, $hi)
@@ -31,13 +31,13 @@ macro_rules! span_with_attrs_lo_hi {
3131
}
3232

3333
macro_rules! span_with_attrs {
34-
($this: ident) => {
34+
($this:ident) => {
3535
span_with_attrs_lo_hi!($this, $this.span.lo(), $this.span.hi())
3636
};
3737
}
3838

3939
macro_rules! implement_spanned {
40-
($this: ty) => {
40+
($this:ty) => {
4141
impl Spanned for $this {
4242
fn span(&self) -> Span {
4343
span_with_attrs!(self)

src/utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ macro_rules! msg {
266266
// For format_missing and last_pos, need to use the source callsite (if applicable).
267267
// Required as generated code spans aren't guaranteed to follow on from the last span.
268268
macro_rules! source {
269-
($this: ident, $sp: expr) => {
269+
($this:ident, $sp:expr) => {
270270
$sp.source_callsite()
271271
};
272272
}
@@ -277,7 +277,7 @@ pub fn mk_sp(lo: BytePos, hi: BytePos) -> Span {
277277

278278
// Return true if the given span does not intersect with file lines.
279279
macro_rules! out_of_file_lines_range {
280-
($self: ident, $span: expr) => {
280+
($self:ident, $span:expr) => {
281281
!$self.config.file_lines().is_all()
282282
&& !$self
283283
.config
@@ -287,15 +287,15 @@ macro_rules! out_of_file_lines_range {
287287
}
288288

289289
macro_rules! skip_out_of_file_lines_range {
290-
($self: ident, $span: expr) => {
290+
($self:ident, $span:expr) => {
291291
if out_of_file_lines_range!($self, $span) {
292292
return None;
293293
}
294294
};
295295
}
296296

297297
macro_rules! skip_out_of_file_lines_range_visitor {
298-
($self: ident, $span: expr) => {
298+
($self:ident, $span:expr) => {
299299
if out_of_file_lines_range!($self, $span) {
300300
$self.push_rewrite($span, None);
301301
return;

0 commit comments

Comments
 (0)