]> git.proxmox.com Git - cargo.git/commitdiff
fix mdbook test with ```ignore
authorGus Wynn <guswynn@gmail.com>
Sat, 25 Jan 2020 23:40:00 +0000 (15:40 -0800)
committerGus Wynn <guswynn@gmail.com>
Fri, 4 Sep 2020 01:27:02 +0000 (18:27 -0700)
src/doc/src/guide/dependencies.md
src/doc/src/reference/build-script-examples.md
src/doc/src/reference/cargo-targets.md
src/doc/src/reference/environment-variables.md
src/doc/src/reference/publishing.md
src/doc/src/reference/registries.md
src/doc/src/reference/specifying-dependencies.md
src/doc/src/reference/unstable.md

index a6d129a359d94095f02151eb50c1eac054b3cf5b..9ca6061e6849937a6218e2c41e5e7980657fc5f0 100644 (file)
@@ -71,7 +71,7 @@ we choose to `cargo update`.
 
 You can now use the `regex` library in `main.rs`.
 
-```rust
+```rust,ignore
 use regex::Regex;
 
 fn main() {
index bd7f9e1e3d5289a84db44ed06b92484ab372656b..03eb9213a2d820911a5a17903a54433d3cfd8c22 100644 (file)
@@ -30,7 +30,7 @@ library call as part of the build script.
 
 First, let’s take a look at the directory structure of this package:
 
-```
+```text
 .
 ├── Cargo.toml
 ├── build.rs
@@ -128,7 +128,7 @@ a Rust library which calls into C to print “Hello, World!”.
 
 Like above, let’s first take a look at the package layout:
 
-```
+```text
 .
 ├── Cargo.toml
 ├── build.rs
index ebff8be475da38680b0a865dfcfc2631855cc218..3968c2e213d705439d1d13b34ba0b2578e6fc097 100644 (file)
@@ -334,7 +334,7 @@ situations. For example, if you have a library where you want a *module* named
 compile anything in the `bin` directory as an executable. Here is a sample
 layout of this scenario:
 
-```
+```text
 ├── Cargo.toml
 └── src
     ├── lib.rs
index 375ee9871b8e48ec0f1a466435b8434c0e4833f9..fc580e22fc46b65bb15fda74a584d9be68001f1e 100644 (file)
@@ -166,7 +166,7 @@ Note that this applies for running binaries with `cargo run` and `cargo test`
 as well. To get the value of any of these variables in a Rust program, do
 this:
 
-```rust
+```rust,ignore
 let version = env!("CARGO_PKG_VERSION");
 ```
 
@@ -235,7 +235,7 @@ Cargo sets several environment variables when build scripts are run. Because the
 are not yet set when the build script is compiled, the above example using `env!` won't work
 and instead you'll need to retrieve the values when the build script is run:
 
-```rust
+```rust,ignore
 use std::env;
 let out_dir = env::var("OUT_DIR").unwrap();
 ```
index 3f01dd16f1af1d1b9ce004ab833ea78513d88a75..98c941154512f5bc7c93d3b3d70930187a9b5f27 100644 (file)
@@ -221,7 +221,9 @@ for permission if [crates.io] doesn’t have all the scopes it would like to.
 An additional barrier to querying GitHub is that the organization may be
 actively denying third party access. To check this, you can go to:
 
-    https://github.com/organizations/:org/settings/oauth_application_policy
+```text
+https://github.com/organizations/:org/settings/oauth_application_policy
+```
 
 where `:org` is the name of the organization (e.g., `rust-lang`). You may see
 something like:
index 6b49cd0dc05db93fcdda734f8515d22fb39a8471..675645ce11d81c55f9531fee5d81ec33d1f8a474 100644 (file)
@@ -38,7 +38,7 @@ As with most config values, the index may be specified with an environment
 variable instead of a config file. For example, setting the following
 environment variable will accomplish the same thing as defining a config file:
 
-```
+```ignore
 CARGO_REGISTRIES_MY_REGISTRY_INDEX=https://my-intranet:8080/git/index
 ```
 
index 28c83b93f45c0e46eef1e304e81d4daaf2fc60e0..b770b0ed6b436c41456d7778ce0bf1f97274a673 100644 (file)
@@ -398,7 +398,7 @@ baz = { version = "0.1", registry = "custom", package = "foo" }
 
 In this example, three crates are now available in your Rust code:
 
-```rust
+```rust,ignore
 extern crate foo; // crates.io
 extern crate bar; // git repository
 extern crate baz; // registry `custom`
index 6532b8c0768f3782b39480893f1a0a318260abe7..db1b6d0dc6253f0b2f68dbd6465b73afe9611ba2 100644 (file)
@@ -82,7 +82,7 @@ exact filename can be tricky since you need to parse JSON output. The
 that the artifacts are copied, so the originals are still in the `target`
 directory. Example:
 
-```
+```sh
 cargo +nightly build --out-dir=out -Z unstable-options
 ```
 
@@ -105,7 +105,7 @@ while also passing it a `--target` option, as well as enabling
 `-Zunstable-features --enable-per-target-ignores` and passing along
 information from `.cargo/config.toml`. See the rustc issue for more information.
 
-```
+```sh
 cargo test --target foo -Zdoctest-xcompile
 ```
 
@@ -163,7 +163,7 @@ profiles from which the custom profile inherits are inherited too.
 
 For example, using `cargo build` with `--profile` and the manifest from above:
 
-```
+```sh
 cargo +nightly build --profile release-lto -Z unstable-options
 ```
 
@@ -223,7 +223,7 @@ information about which commands would be run without actually executing
 anything. This can be useful when integrating with another build tool.
 Example:
 
-```
+```sh
 cargo +nightly build --build-plan -Z unstable-options
 ```
 
@@ -296,7 +296,7 @@ need to have the source code for the standard library available, and at this
 time the only supported method of doing so is to add the `rust-src` rust rustup
 component:
 
-```
+```console
 $ rustup component add rust-src --toolchain nightly
 ```
 
@@ -306,7 +306,7 @@ just forced to pass `--target` in one form or another.
 
 Usage looks like:
 
-```
+```console
 $ cargo new foo
 $ cd foo
 $ 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`,
 `test` crate. If you're working with an environment which does not support some
 of these crates, then you can pass an argument to `-Zbuild-std` as well:
 
-```
+```console
 $ cargo +nightly build -Z build-std=core,alloc
 ```
 
@@ -373,7 +373,7 @@ override the default list of features enabled.
 The `timings` feature gives some information about how long each compilation
 takes, and tracks concurrency information over time.
 
-```
+```sh
 cargo +nightly build -Z timings
 ```
 
@@ -470,7 +470,7 @@ variables, which take precedence over config files.
 
 Some examples of what it looks like using Bourne shell syntax:
 
-```sh
+```console
 # Most shells will require escaping.
 cargo --config http.proxy=\"http://example.com\" …