Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades for mdbook 0.2.0, and link style cleanup. #391

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
book
*~
.*.sw*
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rust:
- nightly

install:
- travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.1.7/mdbook-v0.1.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin
- travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.2.3/mdbook-v0.2.3-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin

script:
- export PATH=$PATH:/home/travis/.cargo/bin && mdbook test
Expand Down
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ title = "The Rust Reference"
author = "The Rust Project Developers"

[output.html]
additional-css = ["theme/reference.css"]

additional-css = ["src/theme/reference.css"]
82 changes: 41 additions & 41 deletions src/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ names have meaning.
> sections for each attribute. It is not the full list of crate-root attributes.

- `crate_name` - specify the crate's crate name.
- `crate_type` - see [linkage](linkage.html).
- `crate_type` - see [linkage](linkage.md).
- `no_builtins` - disable optimizing certain code patterns to invocations of
library functions that are assumed to exist
- `no_main` - disable emitting the `main` symbol. Useful when some other
Expand Down Expand Up @@ -145,7 +145,7 @@ On an `extern` block, the following attributes are interpreted:
- `link` - indicate that a native library should be linked to for the
declarations in this block to be linked correctly. `link` supports an optional
`kind` key with three possible values: `dylib`, `static`, and `framework`. See
[external blocks](items/external-blocks.html) for more about external blocks.
[external blocks](items/external-blocks.md) for more about external blocks.
Two examples: `#[link(name = "readline")]` and
`#[link(name = "CoreFoundation", kind = "framework")]`.
- `linked_from` - indicates what native library this block of FFI items is
Expand All @@ -162,7 +162,7 @@ interpreted:
- `linkage` - on a static, this specifies the [linkage
type](http://llvm.org/docs/LangRef.html#linkage-types).

See [type layout](type-layout.html) for documentation on the `repr` attribute
See [type layout](type-layout.md) for documentation on the `repr` attribute
which can be used to control type layout.

## Macro-related attributes
Expand Down Expand Up @@ -210,7 +210,7 @@ fields, `since` and `note`.
- `note` is a free text field, allowing you to provide an explanation about
the deprecation and preferred alternatives.

Only [public items](visibility-and-privacy.html) can be given the
Only [public items](visibility-and-privacy.md) can be given the
`#[deprecated]` attribute. `#[deprecated]` on a module is inherited by all
child items of that module.

Expand Down Expand Up @@ -552,45 +552,45 @@ impl<T: PartialEq> PartialEq for Foo<T> {

You can implement `derive` for your own traits through [procedural macros].

[_LiteralExpression_]: expressions/literal-expr.html
[_SimplePath_]: paths.html#simple-paths
[`no_implicit_prelude`]: items/modules.html#prelude-items
[`no_std`]: crates-and-source-files.html#preludes-and-no_std
[Doc comments]: comments.html#doc-comments
[_LiteralExpression_]: expressions/literal-expr.md
[_SimplePath_]: paths.md#simple-paths
[`no_implicit_prelude`]: items/modules.md#prelude-items
[`no_std`]: crates-and-source-files.md#preludes-and-no_std
[Doc comments]: comments.md#doc-comments
[The Rustdoc Book]: ../rustdoc/the-doc-attribute.html
[module]: items/modules.html
[prelude]: crates-and-source-files.html#preludes-and-no_std
[procedural macros]: procedural-macros.html
[struct]: items/structs.html
[enum]: items/enumerations.html
[union]: items/unions.html
[functions]: items/functions.html
[expression]: expressions.html
[expression statement]: statements.html#expression-statements
[call expression]: expressions/call-expr.html
[block expression]: expressions/block-expr.html
[block expressions]: expressions/block-expr.html
[`Drop`]: special-types-and-traits.html#drop
[let statement]: statements.html#let-statements
[module]: items/modules.md
[prelude]: crates-and-source-files.md#preludes-and-no_std
[procedural macros]: procedural-macros.md
[struct]: items/structs.md
[enum]: items/enumerations.md
[union]: items/unions.md
[functions]: items/functions.md
[expression]: expressions.md
[expression statement]: statements.md#expression-statements
[call expression]: expressions/call-expr.md
[block expression]: expressions/block-expr.md
[block expressions]: expressions/block-expr.md
[`Drop`]: special-types-and-traits.md#drop
[let statement]: statements.md#let-statements
[unstable book plugin]: ../unstable-book/language-features/plugin.html#lint-plugins
[zero-variant enum]: items/enumerations.html#zero-variant-enums
[zero-variant enum]: items/enumerations.md#zero-variant-enums
[ECMA-334]: https://www.ecma-international.org/publications/standards/Ecma-334.htm
[ECMA-335]: https://www.ecma-international.org/publications/standards/Ecma-335.htm
[item declarations]: items.html
[generics]: items/generics.html
[implementations]: items/implementations.html
[modules]: items/modules.html
[statements]: statements.html
[match expressions]: expressions/match-expr.html
[external blocks]: items/external-blocks.html
[items]: items.html
[attribute macro]: procedural-macros.html#attribute-macros
[function-like macro]: procedural-macros.html#function-like-procedural-macros
[conditional compilation]: conditional-compilation.html
[derive mode macro]: procedural-macros.html#derive-mode-macros
[trait]: items/traits.html
[main]: crates-and-source-files.html
[item declarations]: items.md
[generics]: items/generics.md
[implementations]: items/implementations.md
[modules]: items/modules.md
[statements]: statements.md
[match expressions]: expressions/match-expr.md
[external blocks]: items/external-blocks.md
[items]: items.md
[attribute macro]: procedural-macros.md#attribute-macros
[function-like macro]: procedural-macros.md#function-like-procedural-macros
[conditional compilation]: conditional-compilation.md
[derive mode macro]: procedural-macros.md#derive-mode-macros
[trait]: items/traits.md
[main]: crates-and-source-files.md
[`Termination`]: ../std/process/trait.Termination.html
[where clause]: items/where-clauses.html
[trait or lifetime bounds]: trait-bounds.html
[Expression Attributes]: expressions.html#expression-attributes
[where clause]: items/where-clauses.md
[trait or lifetime bounds]: trait-bounds.md
[Expression Attributes]: expressions.md#expression-attributes
2 changes: 1 addition & 1 deletion src/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ pub mod outer_module {
}
```

[attributes]: attributes.html
[attributes]: attributes.md
20 changes: 10 additions & 10 deletions src/conditional-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,19 @@ let machine_kind = if cfg!(unix) {
println!("I'm running on a {} machine!", machine_kind);
```

[IDENTIFIER]: identifiers.html
[RAW_STRING_LITERAL]: tokens.html#raw-string-literals
[STRING_LITERAL]: tokens.html#string-literals
[_MetaItem_]: attributes.html
[IDENTIFIER]: identifiers.md
[RAW_STRING_LITERAL]: tokens.md#raw-string-literals
[STRING_LITERAL]: tokens.md#string-literals
[_MetaItem_]: attributes.md
[`--cfg`]: ../rustc/command-line-arguments.html#a--cfg-configure-the-compilation-environment
[`--test`]: ../rustc/command-line-arguments.html#a--test-build-a-test-harness
[`cfg`]: #the-cfg-attribute
[`cfg` macro]: #the-cfg-macro
[`cfg_attr`]: #the-cfg_attr-attribute
[`debug_assert!`]: ../std/macro.debug_assert.html
[attribute]: attributes.html
[attributes]: attributes.html
[crate type]: linkage.html
[expressions]: expressions.html
[items]: items.html
[metaitem]: attributes.html
[attribute]: attributes.md
[attributes]: attributes.md
[crate type]: linkage.md
[expressions]: expressions.md
[items]: items.md
[metaitem]: attributes.md
70 changes: 35 additions & 35 deletions src/const_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,38 @@ A _const context_ is one of the following:
* [statics]
* [enum discriminants]

[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators
[array expressions]: expressions/array-expr.html
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
[array type length expressions]: types/array.html
[assignment expressions]: expressions/operator-expr.html#assignment-expressions
[assignment operator expressions]: expressions/operator-expr.html#compound-assignment-expressions
[block expressions]: expressions/block-expr.html
[borrow]: expressions/operator-expr.html#borrow-operators
[cast]: expressions/operator-expr.html#type-cast-expressions
[closure expressions]: expressions/closure-expr.html
[comparison]: expressions/operator-expr.html#comparison-operators
[constants]: items/constant-items.html
[dereference operator]: expressions/operator-expr.html#the-dereference-operator
[destructors]: destructors.html
[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
[enum variant]: expressions/enum-variant-expr.html
[expression statements]: statements.html#expression-statements
[expressions]: expressions.html
[field]: expressions/field-expr.html
[functions]: items/functions.html
[grouped]: expressions/grouped-expr.html
[interior mutability]: interior-mutability.html
[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators
[let statements]: statements.html#let-statements
[literals]: expressions/literal-expr.html
[negation]: expressions/operator-expr.html#negation-operators
[overflow]: expressions/operator-expr.html#overflow
[paths]: expressions/path-expr.html
[patterns]: patterns.html
[range expressions]: expressions/range-expr.html
[slice]: types/slice.html
[statics]: items/static-items.html
[struct]: expressions/struct-expr.html
[tuple expressions]: expressions/tuple-expr.html
[arithmetic, logical]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators
[array expressions]: expressions/array-expr.md
[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions
[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions
[array type length expressions]: types/array.md
[assignment expressions]: expressions/operator-expr.md#assignment-expressions
[assignment operator expressions]: expressions/operator-expr.md#compound-assignment-expressions
[block expressions]: expressions/block-expr.md
[borrow]: expressions/operator-expr.md#borrow-operators
[cast]: expressions/operator-expr.md#type-cast-expressions
[closure expressions]: expressions/closure-expr.md
[comparison]: expressions/operator-expr.md#comparison-operators
[constants]: items/constant-items.md
[dereference operator]: expressions/operator-expr.md#the-dereference-operator
[destructors]: destructors.md
[enum discriminants]: items/enumerations.md#custom-discriminant-values-for-field-less-enumerations
[enum variant]: expressions/enum-variant-expr.md
[expression statements]: statements.md#expression-statements
[expressions]: expressions.md
[field]: expressions/field-expr.md
[functions]: items/functions.md
[grouped]: expressions/grouped-expr.md
[interior mutability]: interior-mutability.md
[lazy boolean]: expressions/operator-expr.md#lazy-boolean-operators
[let statements]: statements.md#let-statements
[literals]: expressions/literal-expr.md
[negation]: expressions/operator-expr.md#negation-operators
[overflow]: expressions/operator-expr.md#overflow
[paths]: expressions/path-expr.md
[patterns]: patterns.md
[range expressions]: expressions/range-expr.md
[slice]: types/slice.md
[statics]: items/static-items.md
[struct]: expressions/struct-expr.md
[tuple expressions]: expressions/tuple-expr.md
24 changes: 12 additions & 12 deletions src/crates-and-source-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,22 @@ type must be one of the following:
ECMA-335 CLI model, a *library* in the SML/NJ Compilation Manager, a *unit*
in the Owens and Flatt module system, or a *configuration* in Mesa.

[_InnerAttribute_]: attributes.html
[_Item_]: items.html
[_InnerAttribute_]: attributes.md
[_Item_]: items.md
[_shebang_]: https://en.wikipedia.org/wiki/Shebang_(Unix)
[_utf8 byte order mark_]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
[`Termination`]: ../std/process/trait.Termination.html
[`core`]: ../core/index.html
[`core::prelude::v1`]: ../core/prelude/index.html
[`extern crate`]: items/extern-crates.html
[`extern crate`]: items/extern-crates.md
[`std`]: ../std/index.html
[`std::prelude::v1`]: ../std/prelude/index.html
[`use` declaration]: items/use-declarations.html
[attribute]: attributes.html
[attributes]: attributes.html
[function]: items/functions.html
[module]: items/modules.html
[module path]: paths.html
[trait or lifetime bounds]: trait-bounds.html
[unit]: types.html#tuple-types
[where clauses]: items/generics.html#where-clauses
[`use` declaration]: items/use-declarations.md
[attribute]: attributes.md
[attributes]: attributes.md
[function]: items/functions.md
[module]: items/modules.md
[module path]: paths.md
[trait or lifetime bounds]: trait-bounds.md
[unit]: types.md#tuple-types
[where clauses]: items/generics.md#where-clauses
20 changes: 10 additions & 10 deletions src/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ Not running destructors in Rust is safe even if it has a type that isn't
`'static`. [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
variable or field from being dropped automatically.

[initialized]: glossary.html#initialized
[variable]: variables.html
[temporary]: expressions.html#temporary-lifetimes
[Assignment]: expressions/operator-expr.html#assignment-expressions
[initialized]: glossary.md#initialized
[variable]: variables.md
[temporary]: expressions.md#temporary-lifetimes
[Assignment]: expressions/operator-expr.md#assignment-expressions
[`std::ops::Drop::drop`]: ../std/ops/trait.Drop.html
[RFC 1857]: https://github.com/rust-lang/rfcs/blob/master/text/1857-stabilize-drop-order.md
[struct]: types/struct.html
[tuple]: types/tuple.html
[enum variant]: types/enum.html
[array]: types/array.html
[closure]: types/closure.html
[Trait objects]: types/trait-object.html
[struct]: types/struct.md
[tuple]: types/tuple.md
[enum variant]: types/enum.md
[array]: types/array.md
[closure]: types/closure.md
[Trait objects]: types/trait-object.md
[`std::ptr::drop_in_place`]: ../std/ptr/fn.drop_in_place.html
[`std::mem::forget`]: ../std/mem/fn.forget.html
[`std::mem::ManuallyDrop`]: ../std/mem/struct.ManuallyDrop.html
14 changes: 7 additions & 7 deletions src/dynamically-sized-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ types">DSTs</abbr>. Such types can only be used in certain cases:
Notably: [variables], function parameters, [const] and [static] items must be
`Sized`.

[sized]: special-types-and-traits.html#sized
[Slices]: types/slice.html
[trait objects]: types/trait-object.html
[Pointer types]: types/pointer.html
[variables]: variables.html
[const]: items/constant-items.html
[static]: items/static-items.html
[sized]: special-types-and-traits.md#sized
[Slices]: types/slice.md
[trait objects]: types/trait-object.md
[Pointer types]: types/pointer.md
[variables]: variables.md
[const]: items/constant-items.md
[static]: items/static-items.md
Loading