Skip to content

Commit 88fe8ac

Browse files
committed
docs: Use dollar sign for all bash prompts
Making it consistent across the board, as most of them already use `$`. Also split one continues bash run into two, to make it easier see different runs: one with warning and another with error.
1 parent 0198a1e commit 88fe8ac

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ you have a more recent version installed the build system doesn't understand
125125
then you may need to force rustbuild to use an older version. This can be done
126126
by manually calling the appropriate vcvars file before running the bootstrap.
127127

128-
```
129-
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
130-
python x.py build
128+
```batch
129+
> CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
130+
> python x.py build
131131
```
132132

133133
#### Specifying an ABI

src/bootstrap/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ system.
88

99
The rustbuild build system has a primary entry point, a top level `x.py` script:
1010

11-
```
12-
python ./x.py build
11+
```sh
12+
$ python ./x.py build
1313
```
1414

1515
Note that if you're on Unix you should be able to execute the script directly:
1616

17-
```
18-
./x.py build
17+
```sh
18+
$ ./x.py build
1919
```
2020

2121
The script accepts commands, flags, and arguments to determine what to do:
@@ -129,18 +129,18 @@ To follow this course of action, first thing you will want to do is to
129129
install a nightly, presumably using `rustup`. You will then want to
130130
configure your directory to use this build, like so:
131131

132-
```
132+
```sh
133133
# configure to use local rust instead of downloading a beta.
134134
# `--local-rust-root` is optional here. If elided, we will
135135
# use whatever rustc we find on your PATH.
136-
> ./configure --local-rust-root=~/.cargo/ --enable-local-rebuild
136+
$ ./configure --local-rust-root=~/.cargo/ --enable-local-rebuild
137137
```
138138

139139
After that, you can use the `--incremental` flag to actually do
140140
incremental builds:
141141

142-
```
143-
> ./x.py build --incremental
142+
```sh
143+
$ ./x.py build --incremental
144144
```
145145

146146
The `--incremental` flag will store incremental compilation artifacts
@@ -159,7 +159,7 @@ will still be using the local nightly as your bootstrap).
159159
This build system houses all output under the `build` directory, which looks
160160
like this:
161161

162-
```
162+
```sh
163163
# Root folder of all output. Everything is scoped underneath here
164164
build/
165165

src/doc/rustc/src/lints/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ cat main.rs
1212
fn main() {
1313
let x = 5;
1414
}
15-
> rustc main.rs
15+
$ rustc main.rs
1616
warning: unused variable: `x`
1717
--> main.rs:2:9
1818
|

src/doc/rustc/src/lints/levels.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn foo() {
4545

4646
This will produce this warning:
4747

48-
```console
48+
```bash
4949
$ rustc lib.rs --crate-type=lib
5050
warning: unused variable: `x`
5151
--> lib.rs:2:9
@@ -69,7 +69,7 @@ fn main() {
6969
```
7070

7171
```bash
72-
> rustc main.rs
72+
$ rustc main.rs
7373
error: bitshift exceeds the type's number of bits
7474
--> main.rs:2:13
7575
|
@@ -129,7 +129,10 @@ warning: missing documentation for a function
129129
|
130130
1 | pub fn foo() {}
131131
| ^^^^^^^^^^^^
132-
> rustc lib.rs --crate-type=lib -D missing-docs
132+
```
133+
134+
```bash
135+
$ rustc lib.rs --crate-type=lib -D missing-docs
133136
error: missing documentation for crate
134137
--> lib.rs:1:1
135138
|
@@ -150,21 +153,21 @@ error: aborting due to 2 previous errors
150153
You can also pass each flag more than once for changing multiple lints:
151154
152155
```bash
153-
rustc lib.rs --crate-type=lib -D missing-docs -D unused-variables
156+
$ rustc lib.rs --crate-type=lib -D missing-docs -D unused-variables
154157
```
155158
156159
And of course, you can mix these four flags together:
157160
158161
```bash
159-
rustc lib.rs --crate-type=lib -D missing-docs -A unused-variables
162+
$ rustc lib.rs --crate-type=lib -D missing-docs -A unused-variables
160163
```
161164
162165
### Via an attribute
163166
164167
You can also modify the lint level with a crate-wide attribute:
165168
166169
```bash
167-
> cat lib.rs
170+
$ cat lib.rs
168171
#![warn(missing_docs)]
169172
170173
pub fn foo() {}

0 commit comments

Comments
 (0)