Skip to content

Commit c1e57e3

Browse files
committed
Merge pull request #19856 from iKevinY/faq-fixes
Minor changes to Rust Language FAQ Reviewed-by: steveklabnik
2 parents 0e03196 + 26ce387 commit c1e57e3

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/doc/complement-lang-faq.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Some examples that demonstrate different aspects of the language:
2424
[HashMap]: https://github.com/rust-lang/rust/blob/master/src/libcollections/hashmap.rs
2525
[json]: https://github.com/rust-lang/rust/blob/master/src/libserialize/json.rs
2626

27-
You may also be interested in browsing [GitHub's Rust][github-rust] page.
27+
You may also be interested in browsing [trending Rust repositories][github-rust] on GitHub.
2828

2929
[github-rust]: https://github.com/trending?l=rust
3030

@@ -42,7 +42,7 @@ Let the fact that this is an easily countable number be a warning.
4242

4343
## Does it run on Windows?
4444

45-
Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
45+
Yes. All development happens in lockstep on all 3 target platforms (using MinGW, not Cygwin). Note that the Windows implementation currently has some limitations; in particular, the 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
4646

4747
[win64]: https://github.com/rust-lang/rust/issues/1237
4848
[libgcc]: https://github.com/rust-lang/rust/issues/11782
@@ -104,7 +104,7 @@ Similar to the reasoning about default-sync: it wires fewer assumptions into the
104104

105105
## Why are strings UTF-8 by default? Why not UCS2 or UCS4?
106106

107-
The `str` type is UTF-8 because we observe more text in the wild in this encoding -- particularly in network transmissions, which are endian-agnostic -- and we think it's best that the default treatment of I/O not involve having to recode codepoints in each direction.
107+
The `str` type is UTF-8 because we observe more text in the wild in this encoding particularly in network transmissions, which are endian-agnostic and we think it's best that the default treatment of I/O not involve having to recode codepoints in each direction.
108108

109109
This does mean that indexed access to a Unicode codepoint inside a `str` value is an O(n) operation. On the one hand, this is clearly undesirable; on the other hand, this problem is full of trade-offs and we'd like to point a few important qualifications:
110110

@@ -145,23 +145,25 @@ For simplicity, we do not plan to do so. Implementing automatic semicolon insert
145145

146146
## How do I get my program to display the output of logging macros?
147147

148-
**Short answer** set the RUST_LOG environment variable to the name of your source file, sans extension.
148+
**Short Answer**: Set the `RUST_LOG` environment variable to the name of your source file, sans extension.
149149

150150
```sh
151151
rustc hello.rs
152152
export RUST_LOG=hello
153153
./hello
154154
```
155155

156-
**Long answer** RUST_LOG takes a 'logging spec' that consists of a
156+
**Long Answer**: `RUST_LOG` takes a 'logging spec' that consists of a
157157
comma-separated list of paths, where a path consists of the crate name and
158-
sequence of module names, each separated by double-colons. For standalone .rs
159-
files the crate is implicitly named after the source file, so in the above
160-
example we were setting RUST_LOG to the name of the hello crate. Multiple paths
158+
sequence of module names, each separated by double-colons. For standalone `.rs`
159+
files, the crate is implicitly named after the source file, so in the above
160+
example we were setting `RUST_LOG` to the name of the hello crate. Multiple paths
161161
can be combined to control the exact logging you want to see. For example, when
162-
debugging linking in the compiler you might set
163-
`RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath`
164-
For a full description see [the logging crate][1].
162+
debugging linking in the compiler, you might set the following:
163+
164+
RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath
165+
166+
For a full description, see [the logging crate][1].
165167

166168
## How fast is Rust?
167169

@@ -172,6 +174,6 @@ performance.
172174
That said, it is an explicit goal of Rust to be as fast as C++ for most things.
173175
Language decisions are made with performance in mind, and we want Rust to be as
174176
fast as possible. Given that Rust is built on top of LLVM, any performance
175-
improvements in it also help us be faster.
177+
improvements in it also help Rust become faster.
176178

177179
[1]:log/index.html

0 commit comments

Comments
 (0)