Commit Graph

62627 Commits

Author SHA1 Message Date
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
Irfan Hudda
3783c44eac Fix typo in libcore/char.rs 2017-03-29 16:50:09 +05:30
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
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
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
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
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
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
Guillaume Gomez
6a2190c18e Remove unneeded comment 2017-03-28 11:38:55 -06:00
Guillaume Gomez
6d470a9c4a Add a macro to improve code 2017-03-28 11:38:55 -06:00
Guillaume Gomez
d5b6c046de Add missing markdown tags 2017-03-28 11:38:55 -06:00
Guillaume Gomez
f6baea23ba Fix external doc errors 2017-03-28 11:38:55 -06:00
Guillaume Gomez
b96fef8411 End of pulldown switch and remove completely hoedown 2017-03-28 11:38:55 -06:00
Guillaume Gomez
c9415eb98f Remains to fix tables 2017-03-28 11:38:55 -06:00
Guillaume Gomez
08a80cbda6 Replace hoedown with pull in rustdoc 2017-03-28 11:38:55 -06:00
Alex Crichton
61928a0356 Rollup merge of #40865 - alexcrichton:downgrade-mingw, r=arielb1
appveyor: Downgrade MinGW to 6.2.0

It looks like the 6.3.0 MinGW comes with a gdb which has issues (#40184) that an
attempted workaround (#40777) does not actually fix (#40835). The original
motivation for upgradin MinGW was to fix build flakiness (#40546) due to newer
builds not exhibiting the same bug, so let's hope that 6.2.0 isn't too far back
in time and still contains the fix we need.

Closes #40835
2017-03-27 15:56:26 -07:00
Alex Crichton
0dbf84b737 Rollup merge of #40853 - ollie27:error-index, r=steveklabnik
Fix broken Markdown and bad links in the error index

This makes sure RFC links point to the RFC text not the pull request.

r? @steveklabnik
2017-03-27 15:56:26 -07:00
Alex Crichton
700e2ea0c2 Rollup merge of #40852 - ollie27:rustbuild_compiler_docs, r=alexcrichton
rustbuild: Fix compiler docs again

The docs need to be built with the rustbuild feature so the correct
stability attributes (rustc_private) get applied.

r? @alexcrichton
2017-03-27 15:56:26 -07:00
Alex Crichton
68c7385c37 Rollup merge of #40849 - jseyfried:finalize_trait_macro_resolutions, r=nrc
bugfix: finalize resolutions of macros in trait positions

Fixes #40845.
r? @nrc
2017-03-27 15:56:26 -07:00
Alex Crichton
498da9fc39 Rollup merge of #40837 - alanstoate:ascii-docs, r=steveklabnik
change string references in asciiext
2017-03-27 15:56:25 -07:00
Alex Crichton
8cfc93f1db Rollup merge of #40833 - Wallacoloo:doc_to_uppercase_typo, r=steveklabnik
Fix typo in char::to_uppercase documentation

Original documentation appears to have been copied from `char::to_lowercase` in a manner that made it imply that `char::to_uppercase` actually mapped unicode characters to their **lowercase** equivalent.
2017-03-27 15:56:25 -07:00
Alex Crichton
5e9d91831a Rollup merge of #40832 - pftbest:fix_msp430, r=stjepang
libcore: fix compilation on 16bit target (MSP430).

Since PR #40601 has been merged, libcore no longer compiles on MSP430.
The reason is this code in `break_patterns`:
```rust
 let mut random = len;
 random ^= random << 13;
 random ^= random >> 17;
 random ^= random << 5;
 random &= modulus - 1;
```
It assumes that `len` is at least a 32 bit integer.
As a workaround replace `break_patterns` with an empty function for 16bit targets.

cc @stjepang
cc @alexcrichton
2017-03-27 15:56:25 -07:00
Alex Crichton
4d93c12581 Rollup merge of #40828 - projektir:markdown_metadata, r=steveklabnik
rustdoc to accept `#` at the start of a markdown file #40560

This may be a bit odd if `#` and `%` lines are mixed up, but that's not something I've found while doing my search and replace.
2017-03-27 15:56:25 -07:00
Alex Crichton
6b2c4bf22b Rollup merge of #40824 - donniebishop:fromstr_docexample, r=steveklabnik
FromStr implementation example

Referencing #29375. Added example implementation of FromStr trait to API Documentation
2017-03-27 15:56:25 -07:00
Alex Crichton
84712faaa5 Rollup merge of #40819 - donniebishop:master, r=alexcrichton
Link ParseBoolError to from_str method of bool

Referencing task in #29375. Sorry for not opening another branch on my fork for this. Was working on this early this morning and forgot to branch off master
2017-03-27 15:56:24 -07:00
Alex Crichton
bae772bf3c Rollup merge of #40818 - theotherphil:master, r=steveklabnik
Don't stutter in operator trait descriptions

Fixes first item on #29365.

r? @steveklabnik
2017-03-27 15:56:24 -07:00
Alex Crichton
1fe2dfca81 Rollup merge of #40813 - jseyfried:fix_expansion_regression, r=nrc
macros: fix ICE on some nested macro definitions

Fixes #40770.
r? @nrc
2017-03-27 15:56:24 -07:00
Alex Crichton
bccd341d11 Rollup merge of #40778 - alexcrichton:update-cargo, r=alexcrichton
Update cargo submodule

I'm not really sure what we want the cadence here to be. We'll at the very least
update the Cargo submodule right before all releases, but otherwise I figured we
could just do it whenever needed or otherwise weekly (or something like that).

In any case, I don't have a super strong particular reason to do this, it's just
been a week or so since the release!
2017-03-27 15:56:24 -07:00
Alex Crichton
51371157e2 Rollup merge of #40751 - nrc:save-callback, r=eddyb
save-analysis: allow clients to get data directly without writing to a file.
2017-03-27 15:56:23 -07:00
Alex Crichton
12f6c5019a Rollup merge of #40683 - nikomatsakis:incr-comp-coerce-unsized-info, r=eddyb
on-demand-ify `custom_coerce_unsized_kind` and `inherent-impls`

This "on-demand" task both checks for errors and computes the custom unsized kind, if any. This task is only defined on impls of `CoerceUnsized`; invoking it on any other kind of impl results in a bug. This is just to avoid having an `Option`, could easily be changed.

r? @eddyb
2017-03-27 15:56:23 -07:00
Alex Crichton
666bb1959e Rollup merge of #40606 - oli-obk:interned_str_usability, r=jseyfried
Improve `InternedString` usability
2017-03-27 15:56:23 -07:00
Micah Tigley
da74e865b5 Review request changes 2017-03-27 16:14:13 -06:00