Skip to content

Commit

Permalink
Fix rustfmt bug
Browse files Browse the repository at this point in the history
rustfmt will (apparently) eat raw identifiers inside macros when formatting.
This prevents that.
  • Loading branch information
Mark-Simulacrum committed Apr 23, 2020
1 parent 12102db commit 986e55a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcore/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ macro_rules! matches {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_deprecated(since = "1.39.0", reason = "use the `?` operator instead")]
#[doc(alias = "?")]
#[rustfmt::skip] // rustfmt will eat the raw identifer in the r#try! below.
macro_rules! r#try {
($expr:expr) => {
match $expr {
Expand All @@ -336,7 +337,7 @@ macro_rules! r#try {
}
};
($expr:expr,) => {
$crate::try!($expr)
$crate::r#try!($expr)
};
}

Expand Down

0 comments on commit 986e55a

Please sign in to comment.