Commit graph

4923 commits

Author SHA1 Message Date
bors
d7a9d961c3 Auto merge of #56615 - integer32llc:update-book, r=GuillaumeGomez
Update the book to fix some edition-related bugs

I'd love to have this included in a point release if one happens, but the changes aren't worth doing a point release on their own IMO. I'd definitely like to see this backported to beta.

The most urgent changes included here are:

- Chapter 19.6, on macros (including the macro changes that just stabilized), [is cut off](https://github.com/rust-lang/book/issues/1668) because of an ill-placed newline in a comment that [pulldown-cmark interprets incorrectly](https://github.com/raphlinus/pulldown-cmark/issues/124).
- [The `Cargo.toml` shown in the Guessing Game example in Chapter 2 (and one in Chapter 14) doesn't have `edition="2018"`](https://github.com/rust-lang/book/pull/1671), which can be confusing depending on whether the readers have it in theirs or not, think they should remove it if they have it, and the rest of the chapter assumes it's there and the code doesn't compile if you don't have it.
- The redirects implemented as part of only shipping the 2018 edition of the book sometimes lead to [having to click through 2 redirect pages](https://github.com/rust-lang/book/pull/1667) when it could be just one.

There are other small corrections included that were made since the last time the book was updated, but those aren't urgent.

cc @steveklabnik
2018-12-08 22:00:09 +00:00
morganamilo
2fc33f9b97
Add missing comma in Generators 2018-12-08 04:13:18 +00:00
Carol (Nichols || Goulding)
9d75198852
Update the book to fix some edition-related bugs 2018-12-07 17:43:00 -05:00
Steve Klabnik
6b0ac4987a build the edition guide
and update it so that links are correct
2018-12-04 17:06:16 -05:00
kennytm
71d76bec1e
Rollup merge of #56418 - petrochenkov:wintidy, r=nagisa
Fix failing tidy (line endings on Windows)

Updates to `rustc-guide` and `edition-guide` including https://github.com/rust-lang/rustc-guide/pull/246 and https://github.com/rust-lang-nursery/edition-guide/pull/122.
2018-12-03 18:07:14 +08:00
kennytm
65e67025c8
Rollup merge of #56402 - scottmcm:better-marker-trait-example, r=Centril
Improve the unstable book example for #[marker] trait

The previous one didn't actually use the Display&Debug bounds in any way, so I think this one is a bit more meaningful.
2018-12-03 18:07:10 +08:00
Vadim Petrochenkov
12c9b79b68 Fix failing tidy (line endings on Windows) 2018-12-02 00:19:06 +03:00
Scott McMurray
a3b7a21268 Improve the unstable book example for #[marker]
The previous one didn't actually use the Display&Debug bounds in any way, so I think this one is a bit more meaningful.
2018-12-01 02:07:50 -08:00
Alexander Regueiro
7bc1255955 Removed chapter from Unstable Book. 2018-11-30 22:12:39 +00:00
kennytm
440bda4dc8
Rollup merge of #56365 - alexreg:stabilise-self_struct_ctor, r=Centril
Stabilize self_struct_ctor feature.

[**Tracking Issue**](https://github.com/rust-lang/rust/issues/51994)
2018-12-01 02:03:59 +08:00
Alexander Regueiro
d49a8d558f Removed feature gate. 2018-11-30 15:42:43 +00:00
Steve Klabnik
934871aa79 Add the edition guide to doc.rust-lang.org 2018-11-30 09:36:49 -05:00
Steve Klabnik
4c34404940 update nomicon 2018-11-30 09:29:36 -05:00
Guillaume Gomez
2d3236c68f
Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakis
rustc-guide has moved to rust-lang/

r? @nikomatsakis
2018-11-29 13:10:44 +01:00
Guillaume Gomez
143193be6d
Rollup merge of #56148 - mark-i-m:rustc-guide-submodule, r=nikomatsakis
Add rustc-guide as a submodule

Adding this as a submodule will allow two things:
- Linking to the guide from doc.rlo
- Doing a link check as part of the rust CI build

Key question: Do we want to wait for the book to be filled out more? e.g. do we ever want to move it out of the nursery?

r? @nikomatsakis

cc @steveklabnik
2018-11-29 13:10:36 +01:00
Guillaume Gomez
36a4abf6e0
Rollup merge of #56080 - mark-i-m:patch-2, r=steveklabnik
Reduce the amount of bold text at doc.rlo

Currently, all of the text is either huge or small. IMHO this is hard to read, so I propose that we make the second-level headings smaller, without making them any less prominent.

# Before:

![image](https://user-images.githubusercontent.com/8827840/48737315-50447e80-ec13-11e8-8243-6211dbba1aa1.png)

# After:

![image](https://user-images.githubusercontent.com/8827840/48737258-32771980-ec13-11e8-814e-e7851954c05a.png)
2018-11-29 13:10:31 +01:00
Mark Mansi
59ae93daed remove uses of feature gate 2018-11-27 13:13:11 -06:00
Mark Mansi
f3b29ca1c2 remove unstable book entry 2018-11-27 13:13:11 -06:00
Mark Mansi
6494f1e60e rustc-guide has moved 2018-11-26 15:03:13 -06:00
Mark Mansi
a1865edb75 Add rustc-guide as a submodule 2018-11-26 14:55:53 -06:00
Pietro Albini
b16d8eb3f2
Rollup merge of #56072 - da-x:stabilize-literal-matcher, r=petrochenkov
Stabilize macro_literal_matcher

This followed FCP in #35625.

Closes #35625
2018-11-25 17:05:00 +01:00
Pietro Albini
6c2513c0d3
Rollup merge of #56045 - qnighy:additional-sizedness, r=cramertj
Check arg/ret sizedness at ExprKind::Path

This PR solves three problems:

- #50940: ICE on casting unsized tuple struct constructors
- Unsized tuple struct constructors were callable in presence of `unsized_locals`.
- https://github.com/rust-lang/rust/issues/48055#issuecomment-437178966: we cannot relax `Sized` bounds on stable functions because of fn ptr casting

These are caused by lack of `Sized`ness checks for arguments/retvals at **reference sites of `FnDef` items** (not call sites of the functions). Therefore we can basically add more `Sized` obligations on typeck. However, adding `Sized` obligations arbitrarily breaks type inference; to prevent that I added a new method `require_type_is_sized_deferred` which doesn't interfere usual type inference.
2018-11-25 17:04:58 +01:00
Dan Aloni
fc284c1eee Stabilize macro_literal_matcher 2018-11-21 21:31:46 +02:00
Masaki Hara
c6a803a286 Modify doc to reflect the unsized-locals improvement. 2018-11-21 22:20:22 +09:00
Steve Klabnik
57b7d55591 fix more links 2018-11-20 21:25:48 -05:00
Steve Klabnik
240a55ce50 update books 2018-11-20 21:22:31 -05:00
Who? Me?!
28cc944530
Reduce the amount of bold text at doc.rust-lang.org 2018-11-19 15:50:24 -06:00
Vadim Petrochenkov
8e88c3470a resolve: Reintroduce feature gate for uniform paths in imports 2018-11-18 13:57:04 +03:00
QuietMisdreavus
401cb6bb53 don't inline pub use some_crate unless directly asked to 2018-11-09 09:07:57 -06:00
Alexander Regueiro
1cda3c3b49 Added section to Unstable Book. 2018-11-03 04:09:34 +00:00
bors
e53a5ffd6b Auto merge of #54543 - GuillaumeGomez:top-level-index, r=QuietMisdreavus
Add index page argument

@Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything?

r? @QuietMisdreavus
2018-11-02 15:39:25 +00:00
Guillaume Gomez
2b646059a1 Move doc_alias doc 2018-11-02 00:04:56 +01:00
Guillaume Gomez
1244a85729 Add documentation for index-page features 2018-11-02 00:01:53 +01:00
Masaki Hara
7ccf661524 Reflect by-value object safety in the unstable book. 2018-10-24 21:59:07 +09:00
Steve Klabnik
69daa9aac1 update books for the next release 2018-10-20 07:47:32 -04:00
Havvy (Ryan Scheel)
8c186af538 [Rustc Book] Quotes around value in --cfg example 2018-10-16 00:13:05 -07:00
Havvy (Ryan Scheel)
8e10ea6829 [Rustc Book] Explain --cfg's arguments 2018-10-15 21:38:32 -07:00
varkor
f5b89062f6 Unused result warning: "X which must" ↦ "X that must" 2018-10-14 18:25:30 +01:00
Manish Goregaokar
50e410c240 Rollup merge of #54870 - flip1995:stabilize_tool_lints, r=Manishearth
Fixes #47311.
r? @nrc
2018-10-10 15:59:20 -07:00
Manish Goregaokar
8ebc6d6dbb Rollup merge of #54862 - Havvy:cfg_attr_multi, r=petrochenkov
Fixes #47311.
r? @nrc
2018-10-10 15:58:40 -07:00
flip1995
6328850e6d Remove unstable-book documentation 2018-10-09 16:38:38 -07:00
Havvy (Ryan Scheel)
bbe832d570 cfg-attr-multi: Change issue number to actual tracking issue 2018-10-07 21:48:28 -07:00
bors
aefe9b099a Auto merge of #54609 - kzys:404-search, r=GuillaumeGomez
Add the library search box on the 404 page

It actually has a link to search already, but it would be better to
have the search "box" as like index.md to be consistent.

<style> can be shared with index.md, but these pages currently
use https://doc.rust-lang.org/rust.css directly.

Fixes #14572.
2018-10-08 00:33:19 +00:00
Havvy (Ryan Scheel)
35e6c65628 cfg_attr_multi: Feature gate 2018-10-07 02:08:24 -07:00
Kazuyoshi Kato
23af6bb4e3 dro -> duckduckgo
dro means "doc.rust-lang.org", but it is too cryptic.
2018-10-05 08:52:44 -07:00
David Wood
da4a12038b
Introduce language items for Arc and Rc.
This commit introduces language items for `Arc` and `Rc` so that types
can later be checked to be `Arc` or `Rc` in the NLL borrow checker. The
`lang` attribute is currently limited to `stage1` as it requires a
compiler built with knowledge of the expected language items.
2018-10-01 13:50:21 +02:00
Kazuyoshi Kato
ecb5142ede Unify the search boxes
Instead of having the standard library search and DuckDuckGo search.
This change merges two of them, with radio buttons.
2018-09-30 09:00:37 -07:00
Kazuyoshi Kato
f34805a893 Add the library search box on the 404 page
It actually has a link to search already, but it would be better to
have the search "box" as like index.md to be consistent.

<style> can be shared with index.md, but these pages currently
use https://doc.rust-lang.org/rust.css directly.

Fixes #14572.
2018-09-26 22:21:09 -07:00
Jorge Aparicio
234e7c4d2e docs: this llvm feature only supports the ELF object format 2018-09-26 15:25:57 +02:00
Jorge Aparicio
5e686b2104 unstable-book: recommend an INFO section
that makes the output .stack_sizes section non-allocatable when linking with
either GNU LD or LLD
2018-09-26 15:21:26 +02:00