Skip to content

Commit

Permalink
Bump rustfmt to most recently shipped
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Apr 25, 2020
1 parent 93eed40 commit 17a393e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/libcore/iter/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ macro_rules! step_identical_methods {
fn sub_one(&self) -> Self {
Sub::sub(*self, 1)
}
}
};
}

macro_rules! step_impl_unsigned {
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ macro_rules! r#try {
}
};
($expr:expr,) => {
$crate::try!($expr)
$crate::r#try!($expr)
};
}

Expand Down
4 changes: 2 additions & 2 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ impl !Send for Span {}
impl !Sync for Span {}

macro_rules! diagnostic_method {
($name:ident, $level:expr) => (
($name:ident, $level:expr) => {
/// Creates a new `Diagnostic` with the given `message` at the span
/// `self`.
#[unstable(feature = "proc_macro_diagnostic", issue = "54140")]
pub fn $name<T: Into<String>>(self, message: T) -> Diagnostic {
Diagnostic::spanned(self, $level, message)
}
)
};
}

impl Span {
Expand Down
7 changes: 2 additions & 5 deletions src/librustc_metadata/rmeta/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ macro_rules! fixed_size_encoding_byte_len_and_defaults {
// but slicing `[u8]` with `i * N..` is optimized worse, due to the
// possibility of `i * N` overflowing, than indexing `[[u8; N]]`.
let b = unsafe {
std::slice::from_raw_parts(
b.as_ptr() as *const [u8; BYTE_LEN],
b.len() / BYTE_LEN,
)
std::slice::from_raw_parts(b.as_ptr() as *const [u8; BYTE_LEN], b.len() / BYTE_LEN)
};
b.get(i).map(|b| FixedSizeEncoding::from_bytes(b))
}
Expand All @@ -61,7 +58,7 @@ macro_rules! fixed_size_encoding_byte_len_and_defaults {
};
self.write_to_bytes(&mut b[i]);
}
}
};
}

impl FixedSizeEncoding for u32 {
Expand Down
2 changes: 1 addition & 1 deletion src/libserialize/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2305,7 +2305,7 @@ macro_rules! read_primitive {
value => Err(ExpectedError("Number".to_owned(), value.to_string())),
}
}
}
};
}

impl crate::Decoder for Decoder {
Expand Down
26 changes: 19 additions & 7 deletions src/libstd/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,35 @@ pub trait AsciiExt {
macro_rules! delegating_ascii_methods {
() => {
#[inline]
fn is_ascii(&self) -> bool { self.is_ascii() }
fn is_ascii(&self) -> bool {
self.is_ascii()
}

#[inline]
fn to_ascii_uppercase(&self) -> Self::Owned { self.to_ascii_uppercase() }
fn to_ascii_uppercase(&self) -> Self::Owned {
self.to_ascii_uppercase()
}

#[inline]
fn to_ascii_lowercase(&self) -> Self::Owned { self.to_ascii_lowercase() }
fn to_ascii_lowercase(&self) -> Self::Owned {
self.to_ascii_lowercase()
}

#[inline]
fn eq_ignore_ascii_case(&self, o: &Self) -> bool { self.eq_ignore_ascii_case(o) }
fn eq_ignore_ascii_case(&self, o: &Self) -> bool {
self.eq_ignore_ascii_case(o)
}

#[inline]
fn make_ascii_uppercase(&mut self) { self.make_ascii_uppercase(); }
fn make_ascii_uppercase(&mut self) {
self.make_ascii_uppercase();
}

#[inline]
fn make_ascii_lowercase(&mut self) { self.make_ascii_lowercase(); }
}
fn make_ascii_lowercase(&mut self) {
self.make_ascii_lowercase();
}
};
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
2 changes: 1 addition & 1 deletion src/stage0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cargo: beta
# bootstrapping issues with use of new syntax in this repo. If you're looking at
# the beta/stable branch, this key should be omitted, as we don't want to depend
# on rustfmt from nightly there.
rustfmt: nightly-2020-01-31
rustfmt: nightly-2020-04-22

# When making a stable release the process currently looks like:
#
Expand Down

0 comments on commit 17a393e

Please sign in to comment.