Skip to content

Commit

Permalink
Don't run doctests on rustfmt ident sorting page
Browse files Browse the repository at this point in the history
The examples on the rustfmt page about identifier sorting are not
meant to be tested, so let's mark them that way.
  • Loading branch information
traviscross committed Oct 19, 2024
1 parent dae0f58 commit 95d5215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rust-2024/rustfmt-raw-identifier-sorting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ The [Rust Style Guide] includes [rules for sorting][sorting] that `rustfmt` appl

Prior to the 2024 Edition, when sorting rustfmt would use the leading `r#` token instead of the ident which led to unwanted results. For example:

```rust
```rust,ignore
use websocket::client::ClientBuilder;
use websocket::r#async::futures::Stream;
use websocket::result::WebSocketError;
```

In the 2024 Edition, `rustfmt` now produces:

```rust
```rust,ignore
use websocket::r#async::futures::Stream;
use websocket::client::ClientBuilder;
use websocket::result::WebSocketError;
Expand Down

0 comments on commit 95d5215

Please sign in to comment.