]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAdd end whitespace ignore flag for tidy
Guillaume Gomez [Fri, 31 Mar 2017 18:08:31 +0000 (12:08 -0600)]
Add end whitespace ignore flag for tidy

7 years agoFix hard break issue
Guillaume Gomez [Fri, 31 Mar 2017 17:02:46 +0000 (11:02 -0600)]
Fix hard break issue

7 years agoFix multiple footnotes and improve testing
Guillaume Gomez [Thu, 30 Mar 2017 23:29:54 +0000 (17:29 -0600)]
Fix multiple footnotes and improve testing

7 years agoAdd support for image, rules and footnotes
Guillaume Gomez [Thu, 30 Mar 2017 01:48:06 +0000 (19:48 -0600)]
Add support for image, rules and footnotes

7 years agoAuto merge of #40540 - cramertj:check-bodies-as-query, r=nikomatsakis
bors [Wed, 29 Mar 2017 11:55:41 +0000 (11:55 +0000)]
Auto merge of #40540 - cramertj:check-bodies-as-query, r=nikomatsakis

On-demandify the typechecking of item bodies

r? @nikomatsakis

7 years agoAuto merge of #40338 - GuillaumeGomez:pulldown-switch, r=frewsxcv,steveklabnik
bors [Wed, 29 Mar 2017 07:06:13 +0000 (07:06 +0000)]
Auto merge of #40338 - GuillaumeGomez:pulldown-switch, r=frewsxcv,steveklabnik

Replace hoedown with pull in rustdoc

cc @rust-lang/docs

7 years agoAuto merge of #40889 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 29 Mar 2017 03:54:09 +0000 (03:54 +0000)]
Auto merge of #40889 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #40682, #40731, #40783, #40838, #40864
- Failed merges:

7 years agoOn-demandify the typechecking of item bodies
Taylor Cramer [Wed, 15 Mar 2017 05:46:36 +0000 (22:46 -0700)]
On-demandify the typechecking of item bodies

7 years agoRollup merge of #40864 - steveklabnik:update-submodules, r=nrc
Corey Farwell [Wed, 29 Mar 2017 03:19:25 +0000 (23:19 -0400)]
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

7 years agoRollup merge of #40838 - lukaramu:std-net-docs, r=GuillaumeGomez
Corey Farwell [Wed, 29 Mar 2017 03:19:24 +0000 (23:19 -0400)]
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 :smile:

7 years agoRollup merge of #40783 - stepancheg:cursor-new-0, r=aturon
Corey Farwell [Wed, 29 Mar 2017 03:19:23 +0000 (23:19 -0400)]
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]
```

7 years agoRollup merge of #40731 - sfackler:vec-from-iter-spec, r=aturon
Corey Farwell [Wed, 29 Mar 2017 03:19:23 +0000 (23:19 -0400)]
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

7 years agoRollup merge of #40682 - TigleyM:str_doc, r=steveklabnik
Corey Farwell [Wed, 29 Mar 2017 03:19:22 +0000 (23:19 -0400)]
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

7 years agoAuto merge of #40836 - arielb1:issue-32330-copy, r=nikomatsakis
bors [Wed, 29 Mar 2017 01:18:13 +0000 (01:18 +0000)]
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

7 years agoAuto merge of #40867 - alexcrichton:rollup, r=alexcrichton
bors [Tue, 28 Mar 2017 21:10:07 +0000 (21:10 +0000)]
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:

7 years agoImprove function naming
Guillaume Gomez [Tue, 28 Mar 2017 17:54:11 +0000 (11:54 -0600)]
Improve function naming

7 years agoFix id generation
Guillaume Gomez [Sat, 25 Mar 2017 18:07:52 +0000 (19:07 +0100)]
Fix id generation

7 years agoFix plain_summary_line function
Guillaume Gomez [Sat, 25 Mar 2017 00:48:33 +0000 (01:48 +0100)]
Fix plain_summary_line function

7 years agoAdd feature for rustdoc binary
Guillaume Gomez [Fri, 24 Mar 2017 22:53:18 +0000 (23:53 +0100)]
Add feature for rustdoc binary

7 years agoUpdate to last pulldown version
Guillaume Gomez [Fri, 17 Mar 2017 00:05:21 +0000 (01:05 +0100)]
Update to last pulldown version

7 years agoUpdate pulldown version after fix merged
Guillaume Gomez [Sun, 12 Mar 2017 19:28:36 +0000 (20:28 +0100)]
Update pulldown version after fix merged

7 years agoHandle html in markdown as well
Guillaume Gomez [Sat, 11 Mar 2017 17:09:59 +0000 (18:09 +0100)]
Handle html in markdown as well

7 years agoRemove unneeded comment
Guillaume Gomez [Sat, 11 Mar 2017 15:37:35 +0000 (16:37 +0100)]
Remove unneeded comment

7 years agoAdd a macro to improve code
Guillaume Gomez [Sat, 11 Mar 2017 15:27:54 +0000 (16:27 +0100)]
Add a macro to improve code

7 years agoAdd missing markdown tags
Guillaume Gomez [Sat, 11 Mar 2017 00:43:36 +0000 (01:43 +0100)]
Add missing markdown tags

7 years agoFix external doc errors
Guillaume Gomez [Fri, 10 Mar 2017 17:35:15 +0000 (18:35 +0100)]
Fix external doc errors

7 years agoEnd of pulldown switch and remove completely hoedown
Guillaume Gomez [Fri, 10 Mar 2017 13:06:24 +0000 (14:06 +0100)]
End of pulldown switch and remove completely hoedown

7 years agoRemains to fix tables
Guillaume Gomez [Wed, 8 Mar 2017 22:56:00 +0000 (23:56 +0100)]
Remains to fix tables

7 years agoReplace hoedown with pull in rustdoc
Guillaume Gomez [Wed, 8 Mar 2017 00:01:23 +0000 (01:01 +0100)]
Replace hoedown with pull in rustdoc

7 years agoRollup merge of #40865 - alexcrichton:downgrade-mingw, r=arielb1
Alex Crichton [Mon, 27 Mar 2017 20:24:39 +0000 (15:24 -0500)]
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

7 years agoRollup merge of #40853 - ollie27:error-index, r=steveklabnik
Alex Crichton [Mon, 27 Mar 2017 20:24:37 +0000 (15:24 -0500)]
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

7 years agoRollup merge of #40852 - ollie27:rustbuild_compiler_docs, r=alexcrichton
Alex Crichton [Mon, 27 Mar 2017 20:24:36 +0000 (15:24 -0500)]
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

7 years agoRollup merge of #40849 - jseyfried:finalize_trait_macro_resolutions, r=nrc
Alex Crichton [Mon, 27 Mar 2017 20:24:32 +0000 (15:24 -0500)]
Rollup merge of #40849 - jseyfried:finalize_trait_macro_resolutions, r=nrc

bugfix: finalize resolutions of macros in trait positions

Fixes #40845.
r? @nrc

7 years agoRollup merge of #40837 - alanstoate:ascii-docs, r=steveklabnik
Alex Crichton [Mon, 27 Mar 2017 20:24:28 +0000 (15:24 -0500)]
Rollup merge of #40837 - alanstoate:ascii-docs, r=steveklabnik

change string references in asciiext

7 years agoRollup merge of #40833 - Wallacoloo:doc_to_uppercase_typo, r=steveklabnik
Alex Crichton [Mon, 27 Mar 2017 20:24:27 +0000 (15:24 -0500)]
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.

7 years agoRollup merge of #40832 - pftbest:fix_msp430, r=stjepang
Alex Crichton [Mon, 27 Mar 2017 20:24:26 +0000 (15:24 -0500)]
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

7 years agoRollup merge of #40828 - projektir:markdown_metadata, r=steveklabnik
Alex Crichton [Mon, 27 Mar 2017 20:24:25 +0000 (15:24 -0500)]
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.

7 years agoRollup merge of #40824 - donniebishop:fromstr_docexample, r=steveklabnik
Alex Crichton [Mon, 27 Mar 2017 20:24:23 +0000 (15:24 -0500)]
Rollup merge of #40824 - donniebishop:fromstr_docexample, r=steveklabnik

FromStr implementation example

Referencing #29375. Added example implementation of FromStr trait to API Documentation

7 years agoRollup merge of #40819 - donniebishop:master, r=alexcrichton
Alex Crichton [Mon, 27 Mar 2017 20:24:22 +0000 (15:24 -0500)]
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

7 years agoRollup merge of #40818 - theotherphil:master, r=steveklabnik
Alex Crichton [Mon, 27 Mar 2017 20:24:20 +0000 (15:24 -0500)]
Rollup merge of #40818 - theotherphil:master, r=steveklabnik

Don't stutter in operator trait descriptions

Fixes first item on #29365.

r? @steveklabnik

7 years agoRollup merge of #40813 - jseyfried:fix_expansion_regression, r=nrc
Alex Crichton [Mon, 27 Mar 2017 20:24:19 +0000 (15:24 -0500)]
Rollup merge of #40813 - jseyfried:fix_expansion_regression, r=nrc

macros: fix ICE on some nested macro definitions

Fixes #40770.
r? @nrc

7 years agoRollup merge of #40778 - alexcrichton:update-cargo, r=alexcrichton
Alex Crichton [Mon, 27 Mar 2017 20:24:18 +0000 (15:24 -0500)]
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!

7 years agoRollup merge of #40751 - nrc:save-callback, r=eddyb
Alex Crichton [Mon, 27 Mar 2017 20:24:17 +0000 (15:24 -0500)]
Rollup merge of #40751 - nrc:save-callback, r=eddyb

save-analysis: allow clients to get data directly without writing to a file.

7 years agoRollup merge of #40683 - nikomatsakis:incr-comp-coerce-unsized-info, r=eddyb
Alex Crichton [Mon, 27 Mar 2017 20:24:15 +0000 (15:24 -0500)]
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

7 years agoRollup merge of #40606 - oli-obk:interned_str_usability, r=jseyfried
Alex Crichton [Mon, 27 Mar 2017 20:24:14 +0000 (15:24 -0500)]
Rollup merge of #40606 - oli-obk:interned_str_usability, r=jseyfried

Improve `InternedString` usability

7 years agoReview request changes
Micah Tigley [Mon, 27 Mar 2017 22:14:13 +0000 (16:14 -0600)]
Review request changes

7 years agoUpdate various book modules
steveklabnik [Mon, 27 Mar 2017 20:04:56 +0000 (16:04 -0400)]
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.

7 years agoRollup merge of #40516 - alexcrichton:no-cache-handles, r=aturon
Alex Crichton [Mon, 27 Mar 2017 20:24:12 +0000 (15:24 -0500)]
Rollup merge of #40516 - alexcrichton:no-cache-handles, r=aturon

std: Don't cache stdio handles on Windows

This alters the stdio code on Windows to always call `GetStdHandle` whenever the
stdio read/write functions are called as this allows us to track changes to the
value over time (such as if a process calls `SetStdHandle` while it's running).

Closes #40490

7 years agoRollup merge of #40317 - malbarbo:update-libc, r=alexcrichton
Alex Crichton [Mon, 27 Mar 2017 20:24:11 +0000 (15:24 -0500)]
Rollup merge of #40317 - malbarbo:update-libc, r=alexcrichton

Update libc to 0.2.21

Update to include android aarch64 and x86 improvements.

7 years agoappveyor: Downgrade MinGW to 6.2.0
Alex Crichton [Mon, 27 Mar 2017 20:06:56 +0000 (13:06 -0700)]
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

7 years agoAddressed requested changes for PR #40838
lukaramu [Mon, 27 Mar 2017 14:38:17 +0000 (16:38 +0200)]
Addressed requested changes for PR #40838

* Fixed spelling ToSocketAddr -> ToSocketAddrs in module docs
  (which also fixes a link)
* Added missing "when" before "interacting" in module docs
* Changed SocketAddr's top-level docs to explicitly state what socket
  addresses consist of, making them more consistent with SocketAddrV4's
  and SocketAddrV6's docs
* Changed "in C" -> "in C's `netinet/in.h`"
* Changed wording in is_ipv4/is_ipv6 methods to ", `false` otherwise"
* Add missing closing ` ``` ` in Ipv6Addr's examples
* Removed "Errors" section in ToSocketAddrs' to_socket_addrs method as it
  was rather redundant

7 years agoFix broken Markdown and bad links in the error index
Oliver Middleton [Mon, 27 Mar 2017 14:21:04 +0000 (15:21 +0100)]
Fix broken Markdown and bad links in the error index

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

7 years agorustbuild: Fix compiler docs again
Oliver Middleton [Mon, 27 Mar 2017 11:55:57 +0000 (12:55 +0100)]
rustbuild: Fix compiler docs again

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

7 years agoFix various useless derefs and slicings
Oliver Schneider [Fri, 24 Mar 2017 08:31:26 +0000 (09:31 +0100)]
Fix various useless derefs and slicings

7 years agoallow `InternedString` to be compared to `str` directly
Oliver Schneider [Thu, 9 Mar 2017 09:10:18 +0000 (10:10 +0100)]
allow `InternedString` to be compared to `str` directly

7 years agoAuto merge of #40764 - arielb1:range-nodes, r=eddyb
bors [Mon, 27 Mar 2017 05:28:32 +0000 (05:28 +0000)]
Auto merge of #40764 - arielb1:range-nodes, r=eddyb

keep the AST node-id when lowering ExprKind::Range

When the Range expression is the root of a constant, its node-id is
used for the def-id of the body, so it has to be preserved in the AST ->
HIR lowering.

Fixes #40749.

r? @eddyb
beta-nominating because regression

7 years agoEnsure that macro resolutions in trait positions get finalized.
Jeffrey Seyfried [Mon, 27 Mar 2017 05:22:18 +0000 (05:22 +0000)]
Ensure that macro resolutions in trait positions get finalized.

7 years agoFixed spelling mistakes
Alan Stoate [Sun, 26 Mar 2017 21:16:43 +0000 (07:46 +1030)]
Fixed spelling mistakes

7 years agolibcore: sort_unstable: improve randomization in break_patterns.
Vadzim Dambrouski [Sat, 25 Mar 2017 22:01:54 +0000 (01:01 +0300)]
libcore: sort_unstable: improve randomization in break_patterns.

Select 3 random points instead of just 1.
Also the code now compiles on 16bit architectures.

7 years agofix trailing whitespace
lukaramu [Sun, 26 Mar 2017 16:06:22 +0000 (18:06 +0200)]
fix trailing whitespace

7 years agoExpanded std::net module docs
lukaramu [Sun, 26 Mar 2017 15:27:40 +0000 (17:27 +0200)]
Expanded std::net module docs

Part of #29363

7 years agoExpanded top-level docs for std::net{TcpListener,TcpStream,UdpSocket}
lukaramu [Sun, 26 Mar 2017 15:06:39 +0000 (17:06 +0200)]
Expanded top-level docs for std::net{TcpListener,TcpStream,UdpSocket}

Part of #29363

7 years agoAdded links to std::net::Shutdown docs and made them more consistent
lukaramu [Sun, 26 Mar 2017 14:12:27 +0000 (16:12 +0200)]
Added links to std::net::Shutdown docs and made them more consistent

Part of #29363

7 years agoAuto merge of #40826 - frewsxcv:rollup, r=frewsxcv
bors [Sun, 26 Mar 2017 14:04:25 +0000 (14:04 +0000)]
Auto merge of #40826 - frewsxcv:rollup, r=frewsxcv

Rollup of 7 pull requests

- Successful merges: #40642, #40734, #40740, #40771, #40807, #40820, #40821
- Failed merges:

7 years agoAdded examples to std::net::{SocketAddr, SocketAddrV4, SocketAddrV6} docs
lukaramu [Sun, 26 Mar 2017 13:43:25 +0000 (15:43 +0200)]
Added examples to std::net::{SocketAddr, SocketAddrV4, SocketAddrV6} docs

7 years agoExpanded and added links to std::net::{SocketAddr,SocketAddrV4,SocketAddrV6} docs
lukaramu [Sun, 26 Mar 2017 12:13:37 +0000 (14:13 +0200)]
Expanded and added links to std::net::{SocketAddr,SocketAddrV4,SocketAddrV6} docs

Part of #29363
Changed summary sentences of SocketAddr and IpAddr for consistency
Linked to SocketAddrV4 and SocketAddrV6 from SocketAddr, moving explaination
there
Expanded top-level docs for SocketAddrV4 and SocketAddrV6, linking to some
relevant IETF RFCs, and linking back to SocketAddr
Changed some of the method summaries to third person as per RFC 1574; added
links to IETF RFCs where appropriate

7 years agoRemoved link in std::net::ToSocketAddr's summary sentence
lukaramu [Sun, 26 Mar 2017 00:01:32 +0000 (01:01 +0100)]
Removed link in std::net::ToSocketAddr's summary sentence

Relative links in trait methods don't resolve in e.g.
std/primitive.tuple.html
:(

7 years agoExpanded and added links to std::net::{IpAddr,Ipv4Addr,Ipv6Addr} docs
lukaramu [Sun, 26 Mar 2017 12:25:31 +0000 (14:25 +0200)]
Expanded and added links to std::net::{IpAddr,Ipv4Addr,Ipv6Addr} docs

Part of #29363
Expanded top-level documentation & linked to relevant IETF RFCs.
Added a bunch of links (to true/false/Ipv4Addr/etc.) throughout the docs.

7 years agoAdded links to std::net::AddrParseError's documentation
lukaramu [Sat, 25 Mar 2017 18:23:13 +0000 (19:23 +0100)]
Added links to std::net::AddrParseError's documentation

Additionally changed the summary sentence to be more consistent with most
of the other FromStr implementations' error types.

7 years agoAdded links throughout std::net::ToSocketAddrs' documentation
lukaramu [Sat, 25 Mar 2017 17:28:12 +0000 (18:28 +0100)]
Added links throughout std::net::ToSocketAddrs' documentation

Part of #29363

In the section about the default implementations of ToSocketAddrs,
I moved the bulletpoint of SocketAddrV4 & SocketAddrV6 to the one
stating that SocketAddr is constructed trivially, as this is what's
actually the case

7 years agostd::net docs: changed occurences of "RFC" to say "IETF RFC"
lukaramu [Sat, 25 Mar 2017 16:27:00 +0000 (17:27 +0100)]
std::net docs: changed occurences of "RFC" to say "IETF RFC"

part of #29363

7 years agoUpdate std::net:Incoming's docs to use standard iterator boilerplate
lukaramu [Sun, 26 Mar 2017 12:30:03 +0000 (14:30 +0200)]
Update std::net:Incoming's docs to use standard iterator boilerplate

Part of #29363

7 years agoadded missing links in std::net TCP docs
lukaramu [Sat, 25 Mar 2017 16:11:08 +0000 (17:11 +0100)]
added missing links in std::net TCP docs

part of #29363

7 years agochange string references in asciiext r? @steveklabnik
aStoate [Sun, 26 Mar 2017 11:17:22 +0000 (21:47 +1030)]
change string references in asciiext r? @steveklabnik

7 years agoAuto merge of #40501 - jseyfried:shadow_builtin_macros, r=nrc
bors [Sun, 26 Mar 2017 11:45:13 +0000 (11:45 +0000)]
Auto merge of #40501 - jseyfried:shadow_builtin_macros, r=nrc

Allow `use` macro imports to shadow global macros

Terminology:
 - global scope: builtin macros, macros from the prelude, `#[macro_use]`, or `#![plugin(..)]`.
 - legacy scope: crate-local `macro_rules!`.
 - modern scope: `use` macro imports, `macro` (once implemented).

Today, the legacy scope can shadow the global scope (modulo RFC 1560 expanded shadowing restrictions). However, the modern scope cannot shadow or be shadowed by either the global or legacy scopes, leading to ambiguity errors.

This PR allows the modern scope to shadow the global scope (subject to some restrictions).
More specifically, a name in the global scope is as shadowable as a glob import in the module `self`. In other words, we imagine a special, implicit glob import in each module item:
```rust
mod foo {
    #[lexical_only] // Not accessible via `foo::<name>`, like pre-RFC 1560 `use` imports.
    #[shadowable_by_legacy_scope] // for back-compat
    use <global_macros>::*;
}
```

r? @nrc

7 years agostore a copy of the Issue32230 info within TypeError
Ariel Ben-Yehuda [Sun, 26 Mar 2017 11:15:47 +0000 (14:15 +0300)]
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.

7 years agoAuto merge of #40347 - alexcrichton:rm-liblog, r=brson
bors [Sun, 26 Mar 2017 04:26:22 +0000 (04:26 +0000)]
Auto merge of #40347 - alexcrichton:rm-liblog, r=brson

Remove internal liblog

This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via `extern
crate`.

The proposal here is to require that crates pulled in have these lines in their
`src/lib.rs`:

    #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
    #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]

This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:

* Mark themselves as entirely unstable via the `staged_api` feature and the
  `#![unstable]` attribute.
* Allow usage of other unstable crates via `feature(rustc_private)` which is
  required if the crate relies on any other crates to compile (other than std).

7 years agoAuto merge of #40809 - alexcrichton:update-sccache-again, r=alexcrichton
bors [Sun, 26 Mar 2017 01:33:39 +0000 (01:33 +0000)]
Auto merge of #40809 - alexcrichton:update-sccache-again, r=alexcrichton

travis: Update sccache again

Looks like the last version was built with mio 0.6.5 which now has known bugs
against it. This build includes mio 0.6.6

7 years agochar::to_uppercase doc typo: use the 'an' article.
Colin Wallace [Sat, 25 Mar 2017 22:58:35 +0000 (15:58 -0700)]
char::to_uppercase doc typo: use the 'an' article.

7 years agochar::to_uppercase doc typo: s/lowercase/uppercase/
Colin Wallace [Sat, 25 Mar 2017 22:46:13 +0000 (15:46 -0700)]
char::to_uppercase doc typo: s/lowercase/uppercase/

7 years agoAuto merge of #40821 - arielb1:fix-emscripten, r=TimNN
bors [Sat, 25 Mar 2017 22:33:29 +0000 (22:33 +0000)]
Auto merge of #40821 - arielb1:fix-emscripten, r=TimNN

try to fix the build on emscripten

The "upstream" emscripten tar.gz now extracts to `emsdk-portable` instead of `emsdk_portable`, breaking our CI. It might be better to vendor a specific version of emscripten instead of using the latest, but I could not find a good way of doing that.

r? @alexcrichton

7 years agoAvoid using libc::sigemptyset on Android
Marco A L Barbosa [Sat, 25 Mar 2017 20:15:26 +0000 (17:15 -0300)]
Avoid using libc::sigemptyset on Android

7 years agorustdoc to accept `#` at the start of a markdown file #40560
projektir [Sat, 25 Mar 2017 19:33:44 +0000 (15:33 -0400)]
rustdoc to accept `#` at the start of a markdown file #40560

7 years agoChange `try!` to `?`
Donnie Bishop [Sat, 25 Mar 2017 18:41:37 +0000 (14:41 -0400)]
Change `try!` to `?`

7 years agoRollup merge of #40821 - arielb1:fix-emscripten, r=TimNN
Corey Farwell [Sat, 25 Mar 2017 16:30:34 +0000 (09:30 -0700)]
Rollup merge of #40821 - arielb1:fix-emscripten, r=TimNN

try to fix the build on emscripten

The "upstream" emscripten tar.gz now extracts to `emsdk-portable` instead of `emsdk_portable`, breaking our CI. It might be better to vendor a specific version of emscripten instead of using the latest, but I could not find a good way of doing that.

r? @alexcrichton

7 years agoRollup merge of #40820 - irfanhudda:fix-typo-algorithm, r=BurntSushi
Corey Farwell [Sat, 25 Mar 2017 16:30:33 +0000 (09:30 -0700)]
Rollup merge of #40820 - irfanhudda:fix-typo-algorithm, r=BurntSushi

Fix typo in dec2flt/algorithm.rs

7 years agoRollup merge of #40807 - stjepang:optimize-insertion-sort, r=alexcrichton
Corey Farwell [Sat, 25 Mar 2017 16:30:32 +0000 (09:30 -0700)]
Rollup merge of #40807 - stjepang:optimize-insertion-sort, r=alexcrichton

Optimize insertion sort

This change slightly changes the main iteration loop so that LLVM can optimize it more efficiently.

Benchmark:

```
name                                   before ns/iter   after ns/iter    diff ns/iter   diff %
slice::sort_unstable_small_ascending   39 (2051 MB/s)   38 (2105 MB/s)             -1   -2.56%
slice::sort_unstable_small_big_random  579 (2210 MB/s)  575 (2226 MB/s)            -4   -0.69%
slice::sort_unstable_small_descending  80 (1000 MB/s)   70 (1142 MB/s)            -10  -12.50%
slice::sort_unstable_small_random      396 (202 MB/s)   386                       -10   -2.53%
```

The benchmark is not a fluke. I can see that performance on `small_descending` is consistently better after this change. I'm not 100% sure why this makes things faster, but my guess would be that `v.len()+1` to the compiler looks like it could in theory overflow.

7 years agoRollup merge of #40771 - nikomatsakis:issue-40746-privacy-access-levels, r=eddyb
Corey Farwell [Sat, 25 Mar 2017 16:30:31 +0000 (09:30 -0700)]
Rollup merge of #40771 - nikomatsakis:issue-40746-privacy-access-levels, r=eddyb

"on-demandify" privacy and access levels

r? @eddyb
cc @cramertj https://github.com/rust-lang/rust/issues/40746

7 years agoRollup merge of #40740 - shepmaster:inclusive-range-unstable-doc, r=steveklabnik
Corey Farwell [Sat, 25 Mar 2017 16:30:30 +0000 (09:30 -0700)]
Rollup merge of #40740 - shepmaster:inclusive-range-unstable-doc, r=steveklabnik

Basic documentation for inclusive range syntax

Done so that we can remove mention of this from the stable documentation ⚠️.

7 years agoRollup merge of #40734 - adamransom:fix/40661, r=jseyfried
Corey Farwell [Sat, 25 Mar 2017 16:30:29 +0000 (09:30 -0700)]
Rollup merge of #40734 - adamransom:fix/40661, r=jseyfried

Add warning for use of lifetime parameter with 'static bound

Previously a `'static` lifetime bound would result in an `undeclared lifetime` error when compiling, even though it could be considered valid.

However, it is unnecessary to use it as a lifetime bound so we present the user with a warning instead and suggest using the `'static` lifetime directly, in place of the lifetime parameter. We can change this to an error (or warning with lint) if that's decided to be more appropriate.

Example output:
```
warning: unnecessary lifetime parameter `'a`
 --> ../static-lifetime-bound.rs:3:10
  |
3 | fn f<'a: 'static>(val: &'a i32) {
  |      ^^^^^^^^^^^
  |
  = help: you can use the `'static` lifetime directly, in place `'a`
```

Fixes #40661

r? @jseyfried

7 years agoRollup merge of #40642 - frewsxcv:io-bufread-doc-examples, r=GuillaumeGomez
Corey Farwell [Sat, 25 Mar 2017 16:30:28 +0000 (09:30 -0700)]
Rollup merge of #40642 - frewsxcv:io-bufread-doc-examples, r=GuillaumeGomez

Rewrite `io::BufRead` doc examples to better demonstrate behaviors.

Prior to this commit, most of the `BufRead` examples used `StdinLock` to
demonstrate how certain `BufRead` methods worked. Using `StdinLock` is
not ideal since:

* Relying on run-time data means we can't show concrete examples of how
  these methods work up-front. The user is required to run them in order
  to see how they behave.
* If the user tries to run an example in the playpen, it won't work
  because the playpen doesn't support user input to stdin.

7 years agoRemove trailing whitespace
Donnie Bishop [Sat, 25 Mar 2017 16:22:23 +0000 (12:22 -0400)]
Remove trailing whitespace

7 years agofix permissions of emsdk_portable
Tim Neumann [Sat, 25 Mar 2017 16:22:07 +0000 (17:22 +0100)]
fix permissions of emsdk_portable

7 years agoFromStr implementation example
Donnie Bishop [Sat, 25 Mar 2017 15:56:52 +0000 (11:56 -0400)]
FromStr implementation example

7 years agotravis: try to fix the build on emscripten
Ariel Ben-Yehuda [Sat, 25 Mar 2017 12:01:25 +0000 (15:01 +0300)]
travis: try to fix the build on emscripten

The emsdk-portable .tar.gz now extracts to emsdk-portable instead of
emsdk_portable. Handle that.

7 years agoFix libc::bind call on aarch64-linux-android
Marco A L Barbosa [Fri, 17 Mar 2017 11:06:23 +0000 (08:06 -0300)]
Fix libc::bind call on aarch64-linux-android

7 years agoFix c_char (u8 -> i8) definition for i686-linux-android
Marco A L Barbosa [Thu, 16 Mar 2017 19:07:56 +0000 (16:07 -0300)]
Fix c_char (u8 -> i8) definition for i686-linux-android

7 years agoUpdate libc to 0.2.21
Marco A L Barbosa [Tue, 7 Mar 2017 13:17:55 +0000 (10:17 -0300)]
Update libc to 0.2.21

7 years agoFix typo in dec2flt/algorithm.rs
Irfan Hudda [Sat, 25 Mar 2017 10:51:08 +0000 (16:21 +0530)]
Fix typo in dec2flt/algorithm.rs

7 years agoLink ParseBoolError to from_str method of bool
Donnie Bishop [Sat, 25 Mar 2017 10:25:08 +0000 (06:25 -0400)]
Link ParseBoolError to from_str method of bool