Skip to content

Commit e73a899

Browse files
authored
Merge pull request #1222 from Rosto75/pr
Fix several shell output and code highlights.
2 parents 7d0357d + 223c50d commit e73a899

File tree

20 files changed

+31
-31
lines changed

20 files changed

+31
-31
lines changed

src/attribute/cfg/custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Try to run this to see what happens without the custom `cfg` flag.
1818

1919
With the custom `cfg` flag:
2020

21-
```bash
21+
```shell
2222
$ rustc --cfg some_condition custom.rs && ./custom
2323
condition met!
2424
```

src/attribute/crate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn indirect_access() {
3333
When the `crate_type` attribute is used, we no longer need to pass the
3434
`--crate-type` flag to `rustc`.
3535

36-
```bash
36+
```shell
3737
$ rustc lib.rs
3838
$ ls lib*
3939
library.rlib

src/cargo/test.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Each file in `tests` is a separate integration test.
2323

2424
`cargo` naturally provides an easy way to run all of your tests!
2525

26-
```sh
27-
cargo test
26+
```shell
27+
$ cargo test
2828
```
2929

3030
You should see output like this:
3131

32-
```txt
32+
```shell
3333
$ cargo test
3434
Compiling blah v0.1.0 (file:///nobackup/blah)
3535
Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs
@@ -46,11 +46,11 @@ test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
4646

4747
You can also run tests whose name matches a pattern:
4848

49-
```sh
50-
cargo test test_foo
49+
```shell
50+
$ cargo test test_foo
5151
```
5252

53-
```txt
53+
```shell
5454
$ cargo test test_foo
5555
Compiling blah v0.1.0 (file:///nobackup/blah)
5656
Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs

src/crates/lib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn indirect_access() {
1818
}
1919
```
2020

21-
```bash
21+
```shell
2222
$ rustc --crate-type=lib rary.rs
2323
$ ls lib*
2424
library.rlib

src/crates/link.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919
}
2020
```
2121

22-
```bash
22+
```txt
2323
# Where library.rlib is the path to the compiled library, assumed that it's
2424
# in the same directory here:
2525
$ rustc executable.rs --extern rary=library.rlib && ./executable

src/macros/dry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mod test {
6464
}
6565
```
6666

67-
```bash
67+
```shell
6868
$ rustc --test dry.rs && ./dry
6969
running 3 tests
7070
test test::mul_assign ... ok

src/meta/doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn main() {
6060
To run the tests, first build the code as a library, then tell rustdoc where
6161
to find the library so it can link it into each doctest program:
6262

63-
```bash
63+
```shell
6464
$ rustc doc.rs --crate-type lib
6565
$ rustdoc --test --extern doc="libdoc.rlib" doc.rs
6666
```

src/mod/split.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Modules can be mapped to a file/directory hierarchy. Let's break down the
44
[visibility example][visibility] in files:
55

6-
```bash
6+
```shell
77
$ tree .
88
.
99
|-- my
@@ -84,7 +84,7 @@ pub fn public_function() {
8484

8585
Let's check that things still work as before:
8686

87-
```bash
87+
```shell
8888
$ rustc split.rs && ./split
8989
called `my::function()`
9090
called `function()`

src/scope/raii.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() {
4141

4242
Of course, we can double check for memory errors using [`valgrind`][valgrind]:
4343

44-
```bash
44+
```shell
4545
$ rustc raii.rs && valgrind ./raii
4646
==26873== Memcheck, a memory error detector
4747
==26873== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.

src/std/panic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn main() {
3434

3535
Let's check that `panic!` doesn't leak memory.
3636

37-
```bash
37+
```shell
3838
$ rustc panic.rs && valgrind ./panic
3939
==4401== Memcheck, a memory error detector
4040
==4401== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.

0 commit comments

Comments
 (0)