Commit Graph

62764 Commits

Author SHA1 Message Date
Corey Farwell
ea9c8b992c Rollup merge of #40814 - abonander:issue_39436, r=jseyfried
Rustdoc: memoize `pub use`-reexported macros so they don't appear twice in docs

Closes #39436

Preserves existing behavior for `#[macro_reexport]`. `pub use`'d macros are shown as reexports unless inlined, and also correctly obey `#[doc(hidden)]`.

r? @jseyfried

cc @SergioBenitez
2017-03-29 16:53:30 -04:00
Corey Farwell
a9dc8ac7ac Rollup merge of #40780 - aidanhs:aphs-cache-git-modules, r=alexcrichton
Attempt to cache git modules

Partial resolution of #40772, appveyor remains to be done once travis looks like it's working ok.

The approach in this PR is based on the `--reference` flag to `git-clone`/`git-submodule --update` and is a compromise based on the current limitations of the tools we're using.

The ideal would be:
1. have a cached pristine copy of rust-lang/rust master in `$HOME/rustsrc` with all submodules initialised
2. clone the PR branch with `git clone --recurse-submodules --reference $HOME/rustsrc git@github.com:rust-lang/rust.git`

This would (in the nonexistent ideal world) use the pristine copy as an object cache for the top level repo and all submodules, transferring over the network only the changes on the branch. Unfortunately, a) there is no way to manually control the initial clone with travis and b) even if there was, cloned submodules don't use the submodules of the reference as an object cache. So the steps we end up with are:

1. have a cached pristine copy of rust-lang/rust master in `$HOME/rustsrc` with all submodules initialised
2. have a cloned PR branch
3. extract the path of each submodule, and explicitly `git submodule update --init --reference $HOME/rustsrc/$module $module` (i.e. point directly to the location of the pristine submodule repo) for each one

I've also taken some care to make this forward compatible, both for adding and removing submodules.

r? @alexcrichton
2017-03-29 16:53:29 -04:00
Donnie Bishop
19b98f3027 Linked str in from_utf_unchecked 2017-03-29 13:21:31 -04:00
Alex Crichton
c033942925 rustbuild: Update bootstrap compiler
Now that we've also updated cargo's release process this commit also changes the
download location of Cargo from Cargos archives back to the static.r-l.o
archives. This should ensure that the Cargo download is the exact Cargo paired
with the rustc that we release.
2017-03-29 08:55:15 -07:00
bors
e1cec5d4bf Auto merge of #40899 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #40720, #40786, #40841, #40866, #40897
- Failed merges:
2017-03-29 15:38:11 +00:00
raph
5a7e9ad64a Removing trailing spaces 2017-03-29 16:30:39 +02:00
raph
3ac27c3e54 adding /// 2017-03-29 16:19:23 +02:00
raph
022bae8a4a Add example to std::process::abort 2017-03-29 15:59:22 +02:00
Malo Jaffré
4ef554206c Avoid linking to a moved page in rust.html 2017-03-29 15:38:47 +02:00
Corey Farwell
8df6cd365c Rollup merge of #40897 - irfanhudda:fix-typo-char, r=BurntSushi
Fix typo in libcore/char.rs
2017-03-29 08:57:08 -04:00
Corey Farwell
baab5d81bd Rollup merge of #40866 - projektir:once_docs, r=estebank
Adding linking for Once docs #29377

Linking everything around `Once`, `ONCE_INIT`, and `OnceState`.
2017-03-29 08:57:07 -04:00
Corey Farwell
a63b1dfa34 Rollup merge of #40841 - arielb1:immutable-blame, r=pnkfelix
borrowck: consolidate `mut` suggestions

This converts all of borrowck's `mut` suggestions to a new
`mc::ImmutabilityBlame` API instead of the current mix of various hacks.

Fixes #35937.
Fixes #40823.
Fixes #40859.

cc @estebank
r? @pnkfelix
2017-03-29 08:57:06 -04:00
Corey Farwell
96dd9a9d27 Rollup merge of #40786 - frewsxcv:unstable-book-remaining-features, r=steveklabnik
Add all unstable features to Unstable Book.

Add all unstable features to the Unstable Book, also remove a few that
either no longer exist or were promoted to stable.

These changes were extracted out of
https://github.com/rust-lang/rust/pull/40694
2017-03-29 08:57:04 -04:00
Corey Farwell
978c90654b Rollup merge of #40720 - mitsuhiko:feature/rev-key, r=BurntSushi
Added core::cmp::Reverse for sort_by_key reverse sorting

I'm not sure if this is the best way to go about proposing this feature but it's pretty useful. It allows you to use `sort_by_key` and return tuples where a single item is then reversed to how it normally sorts.

I quite miss something like this in Rust currently though I'm not sure if this is the best way to implement it.
2017-03-29 08:57:03 -04:00
Malo Jaffré
950d669a98 Remove unused feature from error index generator
Remove feature `rustdoc`.
2017-03-29 14:31:00 +02:00
bors
cf69238b82 Auto merge of #40540 - cramertj:check-bodies-as-query, r=nikomatsakis
On-demandify the typechecking of item bodies

r? @nikomatsakis
2017-03-29 11:55:41 +00:00
Irfan Hudda
3783c44eac Fix typo in libcore/char.rs 2017-03-29 16:50:09 +05:30
Jeffrey Seyfried
f08d5ad4c5 Refactor how spans are combined in the parser. 2017-03-29 11:17:59 +00:00
Aidan Hobson Sayers
96e174febd Minor tweaks to retry utility 2017-03-29 10:47:43 +01:00
Armin Ronacher
5d3695362f Updated tracking issue for cmp::Reverse 2017-03-29 09:06:52 +02:00
bors
abf5592510 Auto merge of #40338 - GuillaumeGomez:pulldown-switch, r=frewsxcv,steveklabnik
Replace hoedown with pull in rustdoc

cc @rust-lang/docs
2017-03-29 07:06:13 +00:00
projektir
4ea03c876b Fixing formatting issues #29377 2017-03-29 00:52:16 -04:00
topecongiro
11ce5b72a2 Make overlapping_inherent_impls lint a hard error 2017-03-29 13:27:00 +09:00
projektir
3207657d12 Adding linking for Once docs #29377 2017-03-29 00:21:55 -04:00
Corey Farwell
589e01fbfa Add all unstable features to Unstable Book.
Add all unstable features to the Unstable Book, also remove a few that
either no longer exist or were promoted to stable.

These changes were extracted out of
https://github.com/rust-lang/rust/pull/40694
2017-03-29 00:11:02 -04:00
bors
4465f22ef6 Auto merge of #40889 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #40682, #40731, #40783, #40838, #40864
- Failed merges:
2017-03-29 03:54:09 +00:00
Taylor Cramer
3b10b4e95f On-demandify the typechecking of item bodies 2017-03-28 20:36:18 -07:00
Corey Farwell
1214b16507 Rollup merge of #40864 - steveklabnik:update-submodules, r=nrc
Update various book modules

This includes an important fix for rustc contributors in
https://github.com/rust-lang/book/pull/571

I'm going to update the other ones as well here while we're at it; no
need to spam PRs.

r? @nrc
2017-03-28 23:19:25 -04:00
Corey Farwell
2c59e03de2 Rollup merge of #40838 - lukaramu:std-net-docs, r=GuillaumeGomez
Improve std::net docs

Fixes #29363

Summary:
* Added a _lot_ of missing links, both to other types/methods and to IETF RFCs, and changed occurences of just "RFC" to "IETF RFC"
* Expanded a bunch of top-level docs, specifically the module docs & the docs for `TcpListener`, `TcpStream`, `UdpSocket`, `IpAddr`, `Ipv4Addr`, `Ipv6Addr`, `SocketAddr`, `SocketAddrV4`, `SocketAddrV6`,
* Expanded method docs for `SocketAddrV6`, `AddrParseError`,
* Various edits for clarity, consistency, and accuracy

See the commit descriptions for more detail.

Things not done quite as laid out in the task list in #29363:
* `AddrParseError` still doesn't have examples, but I wasn't quite sure how to do them; other `FromStr` error types don't have any, either
* I didn't link to an IETF RFC in `IpAddr`, but in `Ipv4Addr` and `Ipv6Addr` and linked tho those from `IpAddr`; this seems more appropriate to me
* Similarly, I didn't really exand `SocketAddr`'s docs, but elaborated on `SocketAddrV4` and `SocketAddrV6`'s and linked to them from `SocketAddr`

Theres definitely still room for improvement, but this should be a good first effort 😄
2017-03-28 23:19:24 -04:00
Corey Farwell
88badb98c7 Rollup merge of #40783 - stepancheg:cursor-new-0, r=aturon
Document Cursor::new position is 0

... even if contained `Vec` is not empty. E. g. for

```
let v = vec![10u8, 20];
let mut c = io::Cursor::new(v);
c.write_all(b"aaaa").unwrap();
println!("{:?}", c.into_inner());
```

result is

```
[97, 97, 97, 97]
```

and not

```
[10, 20, 97, 97, 97, 97]
```
2017-03-28 23:19:23 -04:00
Corey Farwell
8ae1d444cb Rollup merge of #40731 - sfackler:vec-from-iter-spec, r=aturon
Specialize Vec::from_iter for vec::IntoIter

It's fairly common to expose an API which takes an `IntoIterator` and
immediately collects that into a vector. It's also common to buffer
a bunch of items into a vector and then pass that into one of these
APIs. If the iterator hasn't been advanced, we can make this `from_iter`
simply reassemble the original `Vec` with no actual iteration or
reallocation.

r? @aturon
2017-03-28 23:19:23 -04:00
Corey Farwell
378d230dd4 Rollup merge of #40682 - TigleyM:str_doc, r=steveklabnik
Update docs for std::str

fixes #29375

I noticed there are docs for the `str` primitive type, which contained extensive examples, so my additions give a more general explanation of `&str`. But please let me know if something can be explained more or changed.

r? @steveklabnik
2017-03-28 23:19:22 -04:00
Wesley Wiser
2040daee47 Make the rustdoc sidebar white on src pages
Fixes #40724
2017-03-28 22:45:10 -04:00
Esteban Küber
872d3bc0d7 Simplify labels and move tests to ui 2017-03-28 19:43:38 -07:00
Aidan Hobson Sayers
0347ff5823 Attempt to cache git modules 2017-03-29 02:51:56 +01:00
bors
10b1739588 Auto merge of #40836 - arielb1:issue-32330-copy, r=nikomatsakis
store a copy of the Issue32230 info within TypeError

The data can't be looked up from the region variable directly, because
the region variable might have been destroyed at the end of a snapshot.

Fixes #40000.
Fixes #40743.

beta-nominating because regression.
r? @nikomatsakis
2017-03-29 01:18:13 +00:00
Jeffrey Seyfried
ec7c0aece1 Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
Jeffrey Seyfried
496996c2af Remove code in syntax::codemap. 2017-03-29 00:41:10 +00:00
Jeffrey Seyfried
1979f96549 Move syntax::ext::hygiene to syntax_pos::hygiene. 2017-03-29 00:41:08 +00:00
Armin Ronacher
7efbb69b99 Changed cmp::Reverse to unstable 2017-03-29 01:18:50 +02:00
bors
07a34293fa Auto merge of #40867 - alexcrichton:rollup, r=alexcrichton
Rollup of 19 pull requests

- Successful merges: #40317, #40516, #40524, #40606, #40683, #40751, #40778, #40813, #40818, #40819, #40824, #40828, #40832, #40833, #40837, #40849, #40852, #40853, #40865
- Failed merges:
2017-03-28 21:10:07 +00:00
Austin Bonander
d8fc5b80b6 Rustdoc: test proper representation for pub use macros 2017-03-28 12:39:47 -07:00
Austin Bonander
1fea03548c Rustdoc: memoize pub use-reexported macros so they don't appear twice in docs 2017-03-28 12:39:46 -07:00
Guillaume Gomez
a7c6d3e16a Improve function naming 2017-03-28 11:54:11 -06:00
Guillaume Gomez
286a51da91 Fix id generation 2017-03-28 11:38:56 -06:00
Guillaume Gomez
47e4abf473 Fix plain_summary_line function 2017-03-28 11:38:56 -06:00
Guillaume Gomez
cba67ad801 Add feature for rustdoc binary 2017-03-28 11:38:56 -06:00
Guillaume Gomez
e133821b89 Update to last pulldown version 2017-03-28 11:38:56 -06:00
Guillaume Gomez
474cc09325 Update pulldown version after fix merged 2017-03-28 11:38:56 -06:00
Guillaume Gomez
e51f3253be Handle html in markdown as well 2017-03-28 11:38:55 -06:00