Skip to content

Commit

Permalink
Apply the C-EVOCATIVE guideline to options! (rust-lang#2480)
Browse files Browse the repository at this point in the history
The Rust API Guidelines state that macors should keep the input syntax
of a macro similar to the Rust syntax when possible.

The `options!` macro input followed this format:
```rust
field: {
    ty: Ty,
    ...
}
```
However, the following syntax should be better:
```rust
field: ty {
    ...
}
```
This is done because the `options!` macro defines a `struct` and these
changes still evoke the common `field: ty` syntax followed by Rust.

See
https://rust-lang.github.io/api-guidelines/macros.html#input-syntax-is-evocative-of-the-output-c-evocative.
  • Loading branch information
pvdrz authored Apr 4, 2023
1 parent c3352ce commit 0f1a404
Showing 1 changed file with 107 additions and 211 deletions.
Loading

0 comments on commit 0f1a404

Please sign in to comment.