[doc/book] Assign langs to more code blocks
authorBehnam Esfahbod <behnam@zwnj.org>
Thu, 31 Aug 2017 21:01:17 +0000 (14:01 -0700)
committerBehnam Esfahbod <behnam@zwnj.org>
Thu, 31 Aug 2017 21:49:30 +0000 (14:49 -0700)
src/doc/book/README.md
src/doc/book/src/getting-started/first-steps.md
src/doc/book/src/guide/cargo-toml-vs-cargo-lock.md
src/doc/book/src/guide/creating-a-new-project.md
src/doc/book/src/guide/project-layout.md
src/doc/book/src/reference/build-scripts.md
src/doc/book/src/reference/crates-io.md
src/doc/book/src/reference/environment-variables.md
src/doc/book/src/reference/manifest.md

index af8d04a59ea253607a056fdb1e0e661783542bf0..b24da689e670b57f732acda45f2fe148e86c7529 100644 (file)
@@ -7,7 +7,7 @@ Building the book requires [mdBook]. To get it:
 
 [mdBook]: https://github.com/azerupi/mdBook
 
-```bash
+```shell
 $ cargo install mdbook
 ```
 
@@ -15,7 +15,7 @@ $ cargo install mdbook
 
 To build the book:
 
-```bash
+```shell
 $ mdbook build
 ```
 
@@ -23,7 +23,7 @@ The output will be in the `book` subdirectory. To check it out, open it in
 your web browser.
 
 _Firefox:_
-```bash
+```shell
 $ firefox book/index.html                       # Linux
 $ open -a "Firefox" book/index.html             # OS X
 $ Start-Process "firefox.exe" .\book\index.html # Windows (PowerShell)
@@ -31,7 +31,7 @@ $ start firefox.exe .\book\index.html           # Windows (Cmd)
 ```
 
 _Chrome:_
-```bash
+```shell
 $ google-chrome book/index.html                 # Linux
 $ open -a "Google Chrome" book/index.html       # OS X
 $ Start-Process "chrome.exe" .\book\index.html  # Windows (PowerShell)
index 097f3455d4540fd670332b1a5a81c6ede162ad24..e0f964e801cca03d387b719063aa021de8a3d2f0 100644 (file)
@@ -36,7 +36,7 @@ needs to compile your project.
 
 Here’s what’s in `src/main.rs`:
 
-```
+```rust
 fn main() {
     println!("Hello, world!");
 }
index e373e3869117c0926e6033f70c51c281f42fbf0f..de3f18cb08b6fc4949b0eec37317704336c039b5 100644 (file)
@@ -82,7 +82,6 @@ dependencies = [
 name = "rand"
 version = "0.1.0"
 source = "git+https://github.com/rust-lang-nursery/rand.git#9f35b8e439eeedd60b9414c58f389bdc6a3284f9"
-
 ```
 
 You can see that there’s a lot more information here, including the exact
index 541fec7f6b4e4666e6c05570894bcda31c9e609d..3f0c90e3cec470df9b5d73b42256d2fd59444105 100644 (file)
@@ -39,7 +39,7 @@ needs to compile your project.
 
 Here’s what’s in `src/main.rs`:
 
-```
+```rust
 fn main() {
     println!("Hello, world!");
 }
index f122e46eb9d8556b3fd7dca31d8ff232c9044ff9..1850e5efa3cad9c4f96a5601713b795cb9c4bef2 100644 (file)
@@ -118,7 +118,6 @@ dependencies = [
 name = "rand"
 version = "0.1.0"
 source = "git+https://github.com/rust-lang-nursery/rand.git#9f35b8e439eeedd60b9414c58f389bdc6a3284f9"
-
 ```
 
 You can see that there’s a lot more information here, including the exact
index eb5bb0d2120fe266be8305063723f5b24003183a..2c6fe3d8123a15e0246b7314e87f292b546b48fa 100644 (file)
@@ -49,7 +49,7 @@ All the lines printed to stdout by a build script are written to a file like
 configuration). Any line that starts with `cargo:` is interpreted directly by
 Cargo. This line must be of the form `cargo:key=value`, like the examples below:
 
-```notrust
+```shell
 # specially recognized by Cargo
 cargo:rustc-link-lib=static=foo
 cargo:rustc-link-search=native=/path/to/foo
@@ -212,7 +212,7 @@ library call as part of the build script.
 
 First, let’s take a look at the directory structure of this package:
 
-```notrust
+```shell
 .
 ├── Cargo.toml
 ├── build.rs
@@ -298,7 +298,7 @@ a Rust library which calls into C to print “Hello, World!”.
 
 Like above, let’s first take a look at the project layout:
 
-```notrust
+```shell
 .
 ├── Cargo.toml
 ├── build.rs
index f1a76ddfa98f432a1e16edc02345001e273c1f14..76a36a103b1b5232b9deb760980c172110c69a3b 100644 (file)
@@ -16,7 +16,7 @@ account (required for now). After this, visit your [Account
 Settings](https://crates.io/me) page and run the `cargo login` command
 specified.
 
-```notrust
+```shell
 $ cargo login abcdefghijklmnopqrstuvwxyz012345
 ```
 
@@ -37,7 +37,7 @@ The next step is to package up your crate into a format that can be uploaded to
 our entire crate and package it all up into a `*.crate` file in the
 `target/package` directory.
 
-```notrust
+```shell
 $ cargo package
 ```
 
@@ -87,7 +87,7 @@ Now that we’ve got a `*.crate` file ready to go, it can be uploaded to
 [crates.io] with the `cargo publish` command. And that’s it, you’ve now published
 your first crate!
 
-```notrust
+```shell
 $ cargo publish
 ```
 
@@ -119,7 +119,7 @@ being broken for one reason or another (syntax error, forgot to include a file,
 etc.). For situations such as this, Cargo supports a “yank” of a version of a
 crate.
 
-```notrust
+```shell
 $ cargo yank --vers 1.0.1
 $ cargo yank --vers 1.0.1 --undo
 ```
@@ -142,7 +142,7 @@ A crate is often developed by more than one person, or the primary maintainer
 may change over time! The owner of a crate is the only person allowed to publish
 new versions of the crate, but an owner may designate additional owners.
 
-```notrust
+```shell
 $ cargo owner --add my-buddy
 $ cargo owner --remove my-buddy
 $ cargo owner --add github:rust-lang:owners
index 7abebd0f795dbec7e0637c07934cbe7eba7a04e5..e95b79d6cbc2e46616c2931133040e6b147b47f1 100644 (file)
@@ -40,7 +40,7 @@ Cargo exposes these environment variables to your crate when it is compiled.
 Note that this applies for test binaries as well.
 To get the value of any of these variables in a Rust program, do this:
 
-```
+```rust
 let version = env!("CARGO_PKG_VERSION");
 ```
 
@@ -66,7 +66,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
 use std::env;
 let out_dir = env::var("OUT_DIR").unwrap();
 ```
index a87b7fd53bb78716a3607d689982ef6b8e6e5f67..8b71819c0c441501ddba97158b15fb15b1f3ea63 100644 (file)
@@ -417,7 +417,7 @@ features that people can enable or disable when they build it.
 In that case, Servo will describe features in its `Cargo.toml` and they can be
 enabled using command-line flags:
 
-```
+```shell
 $ cargo build --release --features "shumway pdf"
 ```
 
@@ -535,7 +535,7 @@ Your project can optionally contain folders named `examples`, `tests`, and
 `benches`, which Cargo will treat as containing examples,
 integration tests, and benchmarks respectively.
 
-```notrust
+```shell
 ▾ src/           # directory containing source files
   lib.rs         # the main entry point for libraries and packages
   main.rs        # the main entry point for projects producing executables