Skip to content

Commit c34c8ed

Browse files
authored
Merge pull request #1516 from ehuss/smart-punctuation
Enable mdbook smart-punctuation.
2 parents 1ae3dee + a7b3d9d commit c34c8ed

File tree

19 files changed

+218
-199
lines changed

19 files changed

+218
-199
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install mdbook
2020
run: |
2121
mkdir bin
22-
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
22+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
2323
echo "$(pwd)/bin" >> $GITHUB_PATH
2424
- name: Report versions
2525
run: |

STYLE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ See https://highlightjs.org/ for a list of supported languages.
4141

4242
Rust examples are tested via rustdoc, and should include the appropriate annotations when tests are expected to fail:
4343

44-
* `edition2015` or `edition2018` — If it is edition-specific (see `book.toml` for the default).
45-
* `no_run` — The example should compile successfully, but should not be executed.
46-
* `should_panic` The example should compile and run, but produce a panic.
47-
* `compile_fail` — The example is expected to fail to compile.
48-
* `ignore` — The example shouldn't be built or tested.
44+
* `edition2015` or `edition2018` --- If it is edition-specific (see `book.toml` for the default).
45+
* `no_run` --- The example should compile successfully, but should not be executed.
46+
* `should_panic` --- The example should compile and run, but produce a panic.
47+
* `compile_fail` --- The example is expected to fail to compile.
48+
* `ignore` --- The example shouldn't be built or tested.
4949
This should be avoided if possible.
5050
Usually this is only necessary when the testing framework does not support it (such as external crates or modules, or a proc-macro), or it contains pseudo-code which is not valid Rust.
5151
An HTML comment such as `<!-- ignore: requires extern crate -->` should be placed before the example to explain why it is ignored.

book.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ author = "The Rust Project Developers"
77
additional-css = ["theme/reference.css"]
88
git-repository-url = "https://github.com/rust-lang/reference/"
99
edit-url-template = "https://github.com/rust-lang/reference/edit/master/{path}"
10+
smart-punctuation = true
1011

1112
[output.html.redirect]
1213
"/expressions/enum-variant-expr.html" = "struct-expr.html"

src/attributes.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -204,79 +204,79 @@ pub fn f() {}
204204
The following is an index of all built-in attributes.
205205

206206
- Conditional compilation
207-
- [`cfg`] — Controls conditional compilation.
208-
- [`cfg_attr`] — Conditionally includes attributes.
207+
- [`cfg`] --- Controls conditional compilation.
208+
- [`cfg_attr`] --- Conditionally includes attributes.
209209
- Testing
210-
- [`test`] — Marks a function as a test.
211-
- [`ignore`] — Disables a test function.
212-
- [`should_panic`] — Indicates a test should generate a panic.
210+
- [`test`] --- Marks a function as a test.
211+
- [`ignore`] --- Disables a test function.
212+
- [`should_panic`] --- Indicates a test should generate a panic.
213213
- Derive
214-
- [`derive`] — Automatic trait implementations.
215-
- [`automatically_derived`] — Marker for implementations created by
214+
- [`derive`] --- Automatic trait implementations.
215+
- [`automatically_derived`] --- Marker for implementations created by
216216
`derive`.
217217
- Macros
218-
- [`macro_export`] Exports a `macro_rules` macro for cross-crate usage.
219-
- [`macro_use`] Expands macro visibility, or imports macros from other
218+
- [`macro_export`] --- Exports a `macro_rules` macro for cross-crate usage.
219+
- [`macro_use`] --- Expands macro visibility, or imports macros from other
220220
crates.
221-
- [`proc_macro`] Defines a function-like macro.
222-
- [`proc_macro_derive`] Defines a derive macro.
223-
- [`proc_macro_attribute`] Defines an attribute macro.
221+
- [`proc_macro`] --- Defines a function-like macro.
222+
- [`proc_macro_derive`] --- Defines a derive macro.
223+
- [`proc_macro_attribute`] --- Defines an attribute macro.
224224
- Diagnostics
225-
- [`allow`], [`expect`], [`warn`], [`deny`], [`forbid`] — Alters the default lint level.
226-
- [`deprecated`] — Generates deprecation notices.
227-
- [`must_use`] Generates a lint for unused values.
228-
- [`diagnostic::on_unimplemented`] Hints the compiler to emit a certain error
225+
- [`allow`], [`expect`], [`warn`], [`deny`], [`forbid`] --- Alters the default lint level.
226+
- [`deprecated`] --- Generates deprecation notices.
227+
- [`must_use`] --- Generates a lint for unused values.
228+
- [`diagnostic::on_unimplemented`] --- Hints the compiler to emit a certain error
229229
message if a trait is not implemented.
230230
- ABI, linking, symbols, and FFI
231-
- [`link`] Specifies a native library to link with an `extern` block.
232-
- [`link_name`] Specifies the name of the symbol for functions or statics
231+
- [`link`] --- Specifies a native library to link with an `extern` block.
232+
- [`link_name`] --- Specifies the name of the symbol for functions or statics
233233
in an `extern` block.
234-
- [`link_ordinal`] Specifies the ordinal of the symbol for functions or
234+
- [`link_ordinal`] --- Specifies the ordinal of the symbol for functions or
235235
statics in an `extern` block.
236-
- [`no_link`] — Prevents linking an extern crate.
237-
- [`repr`] — Controls type layout.
238-
- [`crate_type`] Specifies the type of crate (library, executable, etc.).
239-
- [`no_main`] — Disables emitting the `main` symbol.
240-
- [`export_name`] — Specifies the exported symbol name for a function or
236+
- [`no_link`] --- Prevents linking an extern crate.
237+
- [`repr`] --- Controls type layout.
238+
- [`crate_type`] --- Specifies the type of crate (library, executable, etc.).
239+
- [`no_main`] --- Disables emitting the `main` symbol.
240+
- [`export_name`] --- Specifies the exported symbol name for a function or
241241
static.
242-
- [`link_section`] — Specifies the section of an object file to use for a
242+
- [`link_section`] --- Specifies the section of an object file to use for a
243243
function or static.
244-
- [`no_mangle`] — Disables symbol name encoding.
245-
- [`used`] Forces the compiler to keep a static item in the output
244+
- [`no_mangle`] --- Disables symbol name encoding.
245+
- [`used`] --- Forces the compiler to keep a static item in the output
246246
object file.
247-
- [`crate_name`] Specifies the crate name.
247+
- [`crate_name`] --- Specifies the crate name.
248248
- Code generation
249-
- [`inline`] Hint to inline code.
250-
- [`cold`] Hint that a function is unlikely to be called.
251-
- [`no_builtins`] Disables use of certain built-in functions.
252-
- [`target_feature`] — Configure platform-specific code generation.
249+
- [`inline`] --- Hint to inline code.
250+
- [`cold`] --- Hint that a function is unlikely to be called.
251+
- [`no_builtins`] --- Disables use of certain built-in functions.
252+
- [`target_feature`] --- Configure platform-specific code generation.
253253
- [`track_caller`] - Pass the parent call location to `std::panic::Location::caller()`.
254254
- [`instruction_set`] - Specify the instruction set used to generate a functions code
255255
- Documentation
256-
- `doc` — Specifies documentation. See [The Rustdoc Book] for more
256+
- `doc` --- Specifies documentation. See [The Rustdoc Book] for more
257257
information. [Doc comments] are transformed into `doc` attributes.
258258
- Preludes
259-
- [`no_std`] Removes std from the prelude.
260-
- [`no_implicit_prelude`] — Disables prelude lookups within a module.
259+
- [`no_std`] --- Removes std from the prelude.
260+
- [`no_implicit_prelude`] --- Disables prelude lookups within a module.
261261
- Modules
262-
- [`path`] — Specifies the filename for a module.
262+
- [`path`] --- Specifies the filename for a module.
263263
- Limits
264-
- [`recursion_limit`] — Sets the maximum recursion limit for certain
264+
- [`recursion_limit`] --- Sets the maximum recursion limit for certain
265265
compile-time operations.
266-
- [`type_length_limit`] — Sets the maximum size of a polymorphic type.
266+
- [`type_length_limit`] --- Sets the maximum size of a polymorphic type.
267267
- Runtime
268-
- [`panic_handler`] — Sets the function to handle panics.
269-
- [`global_allocator`] Sets the global memory allocator.
270-
- [`windows_subsystem`] Specifies the windows subsystem to link with.
268+
- [`panic_handler`] --- Sets the function to handle panics.
269+
- [`global_allocator`] --- Sets the global memory allocator.
270+
- [`windows_subsystem`] --- Specifies the windows subsystem to link with.
271271
- Features
272-
- `feature` Used to enable unstable or experimental compiler features. See
272+
- `feature` --- Used to enable unstable or experimental compiler features. See
273273
[The Unstable Book] for features implemented in `rustc`.
274274
- Type System
275-
- [`non_exhaustive`] Indicate that a type will have more fields/variants
275+
- [`non_exhaustive`] --- Indicate that a type will have more fields/variants
276276
added in future.
277277
- Debugger
278-
- [`debugger_visualizer`] Embeds a file that specifies debugger output for a type.
279-
- [`collapse_debuginfo`] Controls how macro invocations are encoded in debuginfo.
278+
- [`debugger_visualizer`] --- Embeds a file that specifies debugger output for a type.
279+
- [`collapse_debuginfo`] --- Controls how macro invocations are encoded in debuginfo.
280280

281281
[Doc comments]: comments.md#doc-comments
282282
[ECMA-334]: https://www.ecma-international.org/publications-and-standards/standards/ecma-334/

0 commit comments

Comments
 (0)