Skip to content

Commit fff1b17

Browse files
committed
Restore broken code block highlighting
1 parent 298804c commit fff1b17

11 files changed

+19
-19
lines changed

content/Rust-1.26.1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ context would return true, which is a bug; now, this comparison returns false.
104104
In some cases that may mean that the behavior of code will change, but we
105105
expect this to be relatively unlikely.
106106

107-
```rust,ignore
107+
```rust
108108
use std::f64::NAN;
109109
const FOO: bool = ::std::f64::NAN >= ::std::f64::NAN;
110-
# On 1.26.0
110+
// On 1.26.0
111111
assert_eq!(FOO, true);
112-
# On 1.26.1
112+
// On 1.26.1
113113
assert_eq!(FOO, false);
114114
```
115115

content/Rust-1.30.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ is made stable, which gives you the needed APIs to write these sorts of macros.
153153
It also has significantly improved the APIs for errors, and crates like `syn` and
154154
`quote` are already using them. For example, before:
155155

156-
```rust,ignore
156+
```rust
157157
#[derive(Serialize)]
158158
struct Demo {
159159
ok: String,
@@ -202,7 +202,7 @@ let json = serde_json::from_str("...");
202202
The trick here is that the 'old' style wasn't always needed, due to the way Rust's
203203
module system worked:
204204

205-
```rust,ignore
205+
```rust
206206
extern crate serde_json;
207207

208208
fn main() {

content/Rust-1.54.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ from the appropriate page on our website, and check out the
3232
Rust 1.54 supports invoking function-like macros inside attributes. Function-like macros can be either `macro_rules!` based or procedural macros which are invoked like `macro!(...)`. One notable use case for this is including documentation from other files into Rust doc comments. For example, if your project's README represents a good documentation comment, you can use `include_str!` to directly incorporate the contents. Previously, various workarounds allowed similar functionality, but from 1.54 this is much more ergonomic.
3333

3434

35-
```rust=
35+
```rust
3636
#![doc = include_str!("README.md")]
3737
```
3838

content/Rust-1.60.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ the beta channel (`rustup default beta`) or the nightly channel (`rustup default
3232

3333
Support for LLVM-based coverage instrumentation has been stabilized in rustc. You can try this out on your code by rebuilding your code with `-Cinstrument-coverage`, for example like this:
3434

35-
```shell=
35+
```sh
3636
RUSTFLAGS="-C instrument-coverage" cargo build
3737
```
3838

@@ -48,7 +48,7 @@ for report generation. `llvm-cov` combines the processed output, from
4848
`llvm-profdata`, and the binary itself, because the binary embeds a mapping from
4949
counters to actual source code regions.
5050

51-
```shell=
51+
```sh
5252
rustup component add llvm-tools-preview
5353
$(rustc --print sysroot)/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -sparse default.profraw -o default.profdata
5454
$(rustc --print sysroot)/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov show -Xdemangler=rustfilt target/debug/coverage-testing \
@@ -77,7 +77,7 @@ rustc binary used to compile your code.
7777

7878
Cargo has stabilized support for collecting information on build with the `--timings` flag.
7979

80-
```shell
80+
```sh
8181
$ cargo build --timings
8282
Compiling hello-world v0.1.0 (hello-world)
8383
Timing report saved to target/cargo-timings/cargo-timing-20220318T174818Z.html

content/const-eval-safety-rule-revision.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ If you can test compiling your crate atop the 1.64-beta before the stable
276276
release goes out on September 22nd, all the better! One easy way to try the beta
277277
is to use [rustup's override shortand][rustup] for it:
278278

279-
```shell
279+
```sh
280280
$ rustup update beta
281281
$ cargo +beta build
282282
```

content/inside-rust/polonius-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Polonius refers to a few things. It is a [new formulation](http://smallcultfollo
1717

1818
The motivating example for Polonius is the so-called ["Problem Case #3: conditional control flow across functions"](https://github.com/rust-lang/rfcs/blob/master/text/2094-nll.md#problem-case-3-conditional-control-flow-across-functions): here, returning a reference out of a function, from a conditional.
1919

20-
```rust=
20+
```rust
2121
fn get_default<'r, K: Hash + Eq + Copy, V: Default>(
2222
map: &'r mut HashMap<K, V>,
2323
key: K,
@@ -37,7 +37,7 @@ Returning the mutable reference `value` in the `Some` path requires the mutable
3737

3838
Fixing this borrowck issue requires more precision about flow-sensitivity. It also hints at limitations in our modeling of lifetimes, which appear more clearly in cases with only slightly more complicated control flow, like [issue #47680](https://github.com/rust-lang/rust/issues/47680):
3939

40-
```rust=
40+
```rust
4141
struct Thing;
4242

4343
impl Thing {

content/inside-rust/test-infra-oct-2024.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ so we can remove it as it was causing friction in adding new directives and
8686
authoring tests. For example, the [Specification Team][t-spec] wanted to add a
8787
`//@ reference` directive, but the legacy directive check would trigger on:
8888

89-
```rust,no_run
89+
```rust
9090
// So what if we added a
9191
// reference to the <- `reference` is a known directive, and
9292
// `// reference` looks suspcious!

content/inside-rust/this-development-cycle-in-cargo-1.79.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ We could add `cargo --release <script>`.
227227
This runs into a common challenge of `#!` processing being limited in processing of interpreter arguments which can't be resolved in a fully cross-platform way.
228228

229229
Unfortunately, you can't just do:
230-
```toml=
230+
```toml
231231
[profile.dev]
232232
inherits = "release"
233233
```

content/inside-rust/this-development-cycle-in-cargo-1.80.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Discussion is still on-going.
187187
<!-- 2024-06-04 -->
188188
As far as we are aware, the last remaining step before stabilization is
189189
renaming the configuration ([#13540](https://github.com/rust-lang/cargo/issues/13540)):
190-
```toml=
190+
```toml
191191
[resolver]
192192
something-like-precedence = "something-like-rust-version"
193193
```

content/inside-rust/this-development-cycle-in-cargo-1.82.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ For individual tests, one thing holding back the migration was how json comparis
178178
Cargo's programmatic API generally uses [jsonlines](https://jsonlines.org/) but that doesn't work so well for humans reading and editing the content.
179179
Switching to snapbox adds an extra complexity because it highlights a failure by diffing the expected and actual test results and
180180
diffing works best with line-oriented content.
181-
```jsonld=
181+
```json
182182
{"executable":"[ROOT]/foo/target/debug/007bar[EXE]","features":[],"filenames":"{...}","fresh":false,"manifest_path":"[ROOT]/foo/Cargo.toml","package_id":"path+[ROOTURL]/foo#0.0.1","profile":"{...}","reason":"compiler-artifact","target":"{...}"}
183183
{"reason":"build-finished","success":true}
184184
```
@@ -205,15 +205,15 @@ It would run counter to snapbox's model to implicitly store data in a format con
205205
We solved this in [snapbox#348](https://github.com/assert-rs/snapbox/issues/348) by allow making it explicit, by allowing the the test author to declare the format of the expected data and what it will be compared to.
206206

207207
This allowed us to replace
208-
```rust=
208+
```rust
209209
.with_stdout_data(str![[r#"
210210
{"executable":"[ROOT]/foo/target/debug/007bar[EXE]","features":[],"filenames":"{...}","fresh":false,"manifest_path":"[ROOT]/foo/Cargo.toml","package_id":"path+[ROOTURL]/foo#0.0.1","profile":"{...}","reason":"compiler-artifact","target":"{...}"}
211211
{"reason":"build-finished","success":true}
212212
213213
"#]].json_lines())
214214
```
215215
with
216-
```rust=
216+
```rust
217217
.with_stdout_data(
218218
str![[r#"
219219
[

content/webassembly-targets-change-in-default-target-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ To disable on-by-default WebAssembly proposal it's required that you use Cargo's
251251
[`-Zbuild-std`](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std)
252252
feature. For example:
253253

254-
```shell
254+
```sh
255255
$ export RUSTFLAGS=-Ctarget-cpu=mvp
256256
$ cargo +nightly build -Zbuild-std=panic_abort,std --target wasm32-unknown-unknown
257257
```

0 commit comments

Comments
 (0)