Skip to content

Commit a6e322b

Browse files
committed
fix mdbook test with ```ignore
1 parent 1857880 commit a6e322b

8 files changed

+20
-18
lines changed

src/doc/src/guide/dependencies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ we choose to `cargo update`.
7171

7272
You can now use the `regex` library in `main.rs`.
7373

74-
```rust
74+
```rust,ignore
7575
use regex::Regex;
7676
7777
fn main() {

src/doc/src/reference/build-script-examples.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ library call as part of the build script.
3030

3131
First, let’s take a look at the directory structure of this package:
3232

33-
```
33+
```text
3434
.
3535
├── Cargo.toml
3636
├── build.rs
@@ -128,7 +128,7 @@ a Rust library which calls into C to print “Hello, World!”.
128128

129129
Like above, let’s first take a look at the package layout:
130130

131-
```
131+
```text
132132
.
133133
├── Cargo.toml
134134
├── build.rs

src/doc/src/reference/cargo-targets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ situations. For example, if you have a library where you want a *module* named
334334
compile anything in the `bin` directory as an executable. Here is a sample
335335
layout of this scenario:
336336

337-
```
337+
```text
338338
├── Cargo.toml
339339
└── src
340340
   ├── lib.rs

src/doc/src/reference/environment-variables.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Note that this applies for running binaries with `cargo run` and `cargo test`
166166
as well. To get the value of any of these variables in a Rust program, do
167167
this:
168168

169-
```rust
169+
```rust,ignore
170170
let version = env!("CARGO_PKG_VERSION");
171171
```
172172

@@ -235,7 +235,7 @@ Cargo sets several environment variables when build scripts are run. Because the
235235
are not yet set when the build script is compiled, the above example using `env!` won't work
236236
and instead you'll need to retrieve the values when the build script is run:
237237

238-
```rust
238+
```rust,ignore
239239
use std::env;
240240
let out_dir = env::var("OUT_DIR").unwrap();
241241
```

src/doc/src/reference/publishing.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ for permission if [crates.io] doesn’t have all the scopes it would like to.
221221
An additional barrier to querying GitHub is that the organization may be
222222
actively denying third party access. To check this, you can go to:
223223

224-
https://github.com/organizations/:org/settings/oauth_application_policy
224+
```text
225+
https://github.com/organizations/:org/settings/oauth_application_policy
226+
```
225227

226228
where `:org` is the name of the organization (e.g., `rust-lang`). You may see
227229
something like:

src/doc/src/reference/registries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ As with most config values, the index may be specified with an environment
3838
variable instead of a config file. For example, setting the following
3939
environment variable will accomplish the same thing as defining a config file:
4040

41-
```
41+
```ignore
4242
CARGO_REGISTRIES_MY_REGISTRY_INDEX=https://my-intranet:8080/git/index
4343
```
4444

src/doc/src/reference/specifying-dependencies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ baz = { version = "0.1", registry = "custom", package = "foo" }
398398

399399
In this example, three crates are now available in your Rust code:
400400

401-
```rust
401+
```rust,ignore
402402
extern crate foo; // crates.io
403403
extern crate bar; // git repository
404404
extern crate baz; // registry `custom`

src/doc/src/reference/unstable.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ exact filename can be tricky since you need to parse JSON output. The
8282
that the artifacts are copied, so the originals are still in the `target`
8383
directory. Example:
8484

85-
```
85+
```sh
8686
cargo +nightly build --out-dir=out -Z unstable-options
8787
```
8888

@@ -105,7 +105,7 @@ while also passing it a `--target` option, as well as enabling
105105
`-Zunstable-features --enable-per-target-ignores` and passing along
106106
information from `.cargo/config.toml`. See the rustc issue for more information.
107107

108-
```
108+
```sh
109109
cargo test --target foo -Zdoctest-xcompile
110110
```
111111

@@ -163,7 +163,7 @@ profiles from which the custom profile inherits are inherited too.
163163

164164
For example, using `cargo build` with `--profile` and the manifest from above:
165165

166-
```
166+
```sh
167167
cargo +nightly build --profile release-lto -Z unstable-options
168168
```
169169

@@ -223,7 +223,7 @@ information about which commands would be run without actually executing
223223
anything. This can be useful when integrating with another build tool.
224224
Example:
225225

226-
```
226+
```sh
227227
cargo +nightly build --build-plan -Z unstable-options
228228
```
229229

@@ -296,7 +296,7 @@ need to have the source code for the standard library available, and at this
296296
time the only supported method of doing so is to add the `rust-src` rust rustup
297297
component:
298298

299-
```
299+
```console
300300
$ rustup component add rust-src --toolchain nightly
301301
```
302302

@@ -306,7 +306,7 @@ just forced to pass `--target` in one form or another.
306306

307307
Usage looks like:
308308

309-
```
309+
```console
310310
$ cargo new foo
311311
$ cd foo
312312
$ cargo +nightly run -Z build-std --target x86_64-unknown-linux-gnu
@@ -326,7 +326,7 @@ Using `-Z build-std` will implicitly compile the stable crates `core`, `std`,
326326
`test` crate. If you're working with an environment which does not support some
327327
of these crates, then you can pass an argument to `-Zbuild-std` as well:
328328

329-
```
329+
```console
330330
$ cargo +nightly build -Z build-std=core,alloc
331331
```
332332

@@ -373,7 +373,7 @@ override the default list of features enabled.
373373
The `timings` feature gives some information about how long each compilation
374374
takes, and tracks concurrency information over time.
375375

376-
```
376+
```sh
377377
cargo +nightly build -Z timings
378378
```
379379

@@ -470,7 +470,7 @@ variables, which take precedence over config files.
470470

471471
Some examples of what it looks like using Bourne shell syntax:
472472

473-
```sh
473+
```console
474474
# Most shells will require escaping.
475475
cargo --config http.proxy=\"http://example.com\" …
476476

0 commit comments

Comments
 (0)