4742 Commits

Author SHA1 Message Date
bors
357bf00f1c Auto merge of #48925 - zackmdavis:fn_must_stabilize, r=nikomatsakis
stabilize `#[must_use]` for functions and must-use comparison operators (RFC 1940)

r? @nikomatsakis
2018-04-30 22:02:33 +00:00
bors
4745092d60 Auto merge of #50163 - kornelski:error, r=Kimundi
Bury Error::description()

Second attempt of #49536 https://github.com/rust-lang/rfcs/pull/2230

The exact wording of the default implementation is still up in the air, but I think it's a detail that can be amended later.
2018-04-30 15:17:01 +00:00
Zack M. Davis
3dbdccc6a9 stabilize #[must_use] for functions and must-use operators
This is in the matter of RFC 1940 and tracking issue #43302.
2018-04-28 20:32:49 -07:00
kennytm
d403d82b0a
Rollup merge of #49707 - steveklabnik:rustc-book, r=QuietMisdreavus
Add "the Rustc book"

This PR introduces a new book into the documentation, "The rustc book". We already have books for Cargo, and for Rustdoc, rustc should have some too. This book is focused on *users* of rustc, and provides a nice place to write documentation for users.

I haven't put content here, but plan on scaffolding it out very soon, and wanted this PR open for a few discussions first. One of those is "what exactly should said TOC be?" I plan on having a proposed one up tomorrow, but figured I'd let people know to start thinking about it now.

The big one is that we also will want to put https://github.com/rust-lang-nursery/rustc-guide in-tree as well, and the naming is... tough. I'm proposing:

* doc.rust-lang.org/rustc is "The Rustc book", to mirror the other tools' books.
* doc.rust-lang.org/rustc-contribution is "The Rustc contribution guide", and contains that book

@nikomatsakis et al, any thoughts on this? I'm not attached to it in particular, but had to put something together to get this discussion going. I think mirroring the other tools is a good idea for this work, but am not sure where exactly that leaves yours.

Fixes https://github.com/rust-docs/team/issues/11
2018-04-27 14:16:42 +08:00
Kornel
1912f39e7c Update book submodule to pass linkchecker test 2018-04-25 21:56:06 +01:00
steveklabnik
36475d947b more nits 2018-04-24 12:21:08 -04:00
steveklabnik
ac79c41edc review nits 2018-04-23 11:58:11 -04:00
Guillaume Gomez
1ed3e77b8a Add doc about doc alias feature 2018-04-22 00:30:48 +02:00
tinaun
edc412c5a9 stabilize slice_rsplit feature 2018-04-17 00:48:23 -04:00
kennytm
932431ceda
Rollup merge of #49994 - frewsxcv:frewsxcv-doc-tests, r=QuietMisdreavus
Remove unnecessary indentation in rustdoc book codeblock.

None
2018-04-17 03:34:34 +08:00
steveklabnik
00c860e8a9 write docs for targets 2018-04-16 12:57:16 -04:00
steveklabnik
b204968239 fill out contributing 2018-04-16 12:57:09 -04:00
steveklabnik
cd3f6cf3fe fill out command line arguments 2018-04-16 12:57:01 -04:00
Corey Farwell
afa22d63d7 Remove unnecessary indentation in rustdoc book codeblock. 2018-04-16 16:25:57 +09:00
bors
3e70dfd655 Auto merge of #49956 - QuietMisdreavus:rustdoc-codegen, r=GuillaumeGomez
rustdoc: port the -C option from rustc

Blocked on https://github.com/rust-lang/rust/pull/49864. The included test won't work without those changes, so this PR includes those commits as well.

When documenting items that require certain target features, it helps to be able to force those target features into existence. Rather than include a flag just to parse those features, i instead decided to port the `-C` flag from rustc in its entirety. It takes the same parameters, because it runs through the same parsing function. This has the added benefit of being able to control the codegen of doctests as well.

One concern i have with the flag is that i set it to stable here. My rationale is that it is a direct port of functionality on rustc that is currently stable, used only in mechanisms that it is originally used for. If needed, i can set it back to be unstable.
2018-04-16 05:00:14 +00:00
Mike Hommey
4c8e9b9751 Replace remaining uses of deprecated std::heap with std::alloc 2018-04-14 16:47:38 +09:00
QuietMisdreavus
a5456bdd87 add -C to the rustdoc book 2018-04-13 16:21:27 -05:00
Simon Sapin
f607a3872a Rename alloc::Void to alloc::Opaque 2018-04-12 22:53:22 +02:00
Mike Hommey
fddf51ee0b Use NonNull<Void> instead of *mut u8 in the Alloc trait
Fixes #49608
2018-04-12 22:53:22 +02:00
Simon Sapin
86753ce1cc Use the GlobalAlloc trait for #[global_allocator] 2018-04-12 22:53:12 +02:00
bors
252a459d37 Auto merge of #49371 - scottmcm:catch-wrapping, r=nikomatsakis
Add ok-wrapping to catch blocks, per RFC

Updates the `catch{}` lowering to wrap the result in `Try::from_ok`.

r? @nikomatsakis

Fixes #41414
Fixes #43818
2018-04-12 05:38:49 +00:00
bors
47778811d9 Auto merge of #48528 - bitshifter:repr_packed, r=eddyb
Implementation of `#[repr(packed(n))]` RFC 1399.

Tracking issue https://github.com/rust-lang/rust/issues/33158.
2018-04-12 03:08:14 +00:00
Simon Sapin
b2027ef17c Deprecate the std_unicode crate 2018-04-12 00:13:51 +02:00
Cameron Hart
15d1c4d213 Implementation of #[repr(packed(n))] RFC 1399. 2018-04-11 22:13:13 +10:00
Scott McMurray
c88efe46b8 Fix the unstable book to account for ok-wrapping 2018-04-10 20:03:40 -07:00
steveklabnik
cb6a19925a add codegen options section 2018-04-10 16:35:28 -04:00
steveklabnik
142c52f4a3 fix tests 2018-04-09 14:04:58 -04:00
steveklabnik
758a77d46c more lints 2018-04-09 14:04:58 -04:00
steveklabnik
df81ca3764 document deny by default lints 2018-04-09 14:04:58 -04:00
steveklabnik
50b3a3d121 add a lot of text about lints 2018-04-09 14:04:58 -04:00
steveklabnik
78b076dadb add targets to TOC 2018-04-09 14:04:58 -04:00
steveklabnik
cd55364248 write 'what is rustc' 2018-04-09 14:04:58 -04:00
steveklabnik
5424dc46b7 write headings for command line arguments 2018-04-09 14:04:57 -04:00
steveklabnik
4f6ed513d1 fix authorship in book.toml 2018-04-09 14:04:57 -04:00
steveklabnik
c942bf42fc Add a TOC 2018-04-09 14:04:57 -04:00
steveklabnik
7de5b6034d update doc index to link to the rustc book 2018-04-09 14:04:57 -04:00
steveklabnik
0dd0a5bc03 initialize the rustc book 2018-04-09 14:04:10 -04:00
Pulkit Goyal
ee880b96ae Using X headings instead of 0.X #49739 2018-04-07 00:42:47 +05:30
kennytm
d6f19b676f
Rollup merge of #49628 - steveklabnik:learn-use-master, r=QuietMisdreavus
Re-write the documentation index

The docs team has decided that we're framing resources in three ways:
"learning Rust," "using Rust," "mastering Rust." This is a more useful
split than "beginner/intermediate/advanced." As we add more resources
in the future, we expect "using Rust" to grow. "the bookshelf" as a
concept is great, but isn't really organized along these lines. As such,
this reorganizes the docs along these lines.
2018-04-05 02:17:02 +08:00
steveklabnik
77b570f831 Re-write the documentation index
The docs team has decided that we're framing resources in three ways:
"learning Rust," "using Rust," "mastering Rust." This is a more useful
split than "beginner/intermediate/advanced." As we add more resources
in the future, we expect "using Rust" to grow. "the bookshelf" as a
concept is great, but isn't really organized along these lines. As such,
this reorganizes the docs along these lines.
2018-04-03 15:58:15 -04:00
Thayne McCombs
e75c6a741e Remove splice page from unstable book. 2018-04-02 19:41:22 -06:00
Mark Simulacrum
5d3916d566
Rollup merge of #49451 - QuietMisdreavus:epoch-doctests, r=GuillaumeGomez
rustdoc: add an --edition flag to compile docs/doctests with a certain edition

To correspond with the 2018 edition, this adds a (currently unstable) `--edition` flag to rustdoc that makes it compile crates and doctests with the given edition. Once this lands, Cargo should be updated to pass this flag when the edition configuration option is given.
2018-04-01 18:04:54 +02:00
kennytm
eb3e2feb0d
Rollup merge of #49445 - GuillaumeGomez:light-theme, r=QuietMisdreavus
Rename main theme into light theme

r? @QuietMisdreavus
2018-03-30 01:31:12 +02:00
Guillaume Gomez
772a8028ff Rename main theme into light theme 2018-03-29 13:45:56 +02:00
bors
d52c44ea8d Auto merge of #49460 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests

- Successful merges: #49243, #49329, #49364, #49400, #49405, #49427, #49428, #49429, #49439, #49442, #49444, #49452
- Failed merges:
2018-03-28 22:18:13 +00:00
kennytm
43f56ce131
Rollup merge of #49243 - murarth:stabilize-retain, r=BurntSushi
Stabilize method `String::retain`

Closes #43874
2018-03-28 17:55:05 +02:00
Taylor Cramer
3c65f53620 Stabilize match_default_bindings
This includes a submodule update to rustfmt
in order to allow a stable feature declaration.
2018-03-28 11:13:13 +02:00
QuietMisdreavus
a0e48dde7c talk about --edition in the Rustdoc Book 2018-03-27 16:36:15 +02:00
Mark Mansi
07104692d5 Fix missed i128 feature gates 2018-03-26 08:37:56 -05:00
Mark Mansi
a249d25625 Rename unstable book correctly 2018-03-26 08:37:56 -05:00