Skip to content

Commit

Permalink
Added rustfmt to default whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx committed Feb 24, 2022
1 parent 02fc272 commit a4a95eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions crates/lang/ir/src/ir/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ impl Default for WhitelistedAttributes {
("must_use".to_string(), ()),
// Documentation
("doc".to_string(), ()),
// Formatting
("rustfmt".to_string(), ()),
]))
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/lang/macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub fn selector_bytes(input: TokenStream) -> TokenStream {
/// ```
///
/// **Allowed attributes by default:** `cfg`, `cfg_attr`, `allow`, `warn`, `deny`, `forbid`,
/// `deprecated`, `must_use`, `doc`.`
/// `deprecated`, `must_use`, `doc`, `rustfmt`.
///
/// - `env: impl Environment`
///
Expand Down Expand Up @@ -740,7 +740,7 @@ pub fn contract(attr: TokenStream, item: TokenStream) -> TokenStream {
/// ```
///
/// **Allowed attributes by default:** `cfg`, `cfg_attr`, `allow`, `warn`, `deny`, `forbid`,
/// `deprecated`, `must_use`, `doc`.`
/// `deprecated`, `must_use`, `doc`, `rustfmt`.
#[proc_macro_attribute]
pub fn trait_definition(attr: TokenStream, item: TokenStream) -> TokenStream {
trait_def::analyze(attr.into(), item.into()).into()
Expand Down

0 comments on commit a4a95eb

Please sign in to comment.