Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix formatting
  • Loading branch information
bkchr committed Dec 13, 2022
commit 638917f91a09e858d7f5d88ed19e7f06918cb397
11 changes: 7 additions & 4 deletions primitives/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,9 @@ macro_rules! bounded_btree_map {
/// These feature checking macros can be used to conditionally enable/disable code in a dependent
/// crate based on a feature in the crate where the macro is called.
#[macro_export]
// We need to skip formatting this macro because of this bug:
// https://github.com/rust-lang/rustfmt/issues/5283
#[rustfmt::skip]
macro_rules! generate_feature_enabled_macro {
( $macro_name:ident, $feature_name:meta, $d:tt ) => {
/// Enable/disable the given code depending on
Expand All @@ -643,10 +646,10 @@ macro_rules! generate_feature_enabled_macro {
#[cfg($feature_name)]
#[macro_export]
macro_rules! $macro_name {
( $d ( $d input:tt )* ) => {
$d ( $d input )*
}
}
( $d ( $d input:tt )* ) => {
$d ( $d input )*
}
}

/// Enable/disable the given code depending on
#[doc = concat!("`", stringify!($feature_name), "`")]
Expand Down