]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agorewrite `ExprArray` processing to use `CoerceMany`
Niko Matsakis [Fri, 17 Mar 2017 15:52:37 +0000 (11:52 -0400)]
rewrite `ExprArray` processing to use `CoerceMany`

7 years agorework how we handle the type of loops
Niko Matsakis [Fri, 17 Mar 2017 15:49:53 +0000 (11:49 -0400)]
rework how we handle the type of loops

First, we keep a `CoerceMany` now to find the LUB of all the break
expressions. Second, this `CoerceMany` is actually an
`Option<CoerceMany>`, and we store `None` for loops where "break with an
expression" is disallowed. This avoids silly duplicate errors about a
type mismatch, since the loops pass already reports an error that the
break cannot have an expression. Finally, since we now detect an invalid
break target during HIR lowering, refactor `find_loop` to be infallible.

Adjust tests as needed:

- some spans from breaks are slightly different
- break up a single loop into multiple since `CoerceMany` silences
  redundant and derived errors
- add a ui test that we only give on error for loop-break-value

7 years agodo not eagerly convert `!` to a diverging variable
Niko Matsakis [Fri, 17 Mar 2017 15:48:18 +0000 (11:48 -0400)]
do not eagerly convert `!` to a diverging variable

Instead, wait until coercion time.  This has some small effects on a few
tests (one less temporary, generally better errors when trying to call
methods or otherwise "force" the type).

7 years agodocument the diverges flag etc
Niko Matsakis [Fri, 17 Mar 2017 15:10:12 +0000 (11:10 -0400)]
document the diverges flag etc

7 years agoport `return` expressions to use `CoerceMany`
Niko Matsakis [Fri, 17 Mar 2017 13:54:26 +0000 (09:54 -0400)]
port `return` expressions to use `CoerceMany`

This slightly affects the error messages in one particular compile-fail
test.

7 years agoport if-then-else to use `CoerceMany`
Niko Matsakis [Fri, 17 Mar 2017 13:52:38 +0000 (09:52 -0400)]
port if-then-else to use `CoerceMany`

7 years agoport the match code to use `CoerceMany`
Niko Matsakis [Fri, 17 Mar 2017 13:51:31 +0000 (09:51 -0400)]
port the match code to use `CoerceMany`

`match { }` now (correctly?) indicates divergence, which results in more
unreachable warnings. We also avoid fallback to `!` if there is just one
arm (see new test: `match-unresolved-one-arm.rs`).

7 years agointroduce (but do not yet use) a `CoerceMany` API
Niko Matsakis [Fri, 17 Mar 2017 13:39:13 +0000 (09:39 -0400)]
introduce (but do not yet use) a `CoerceMany` API

The existing pattern for coercions is fairly complex. `CoerceMany`
enapsulates it better into a helper.

7 years agoadd an `ObligationCauseCode` we'll use later (`ReturnNoExpression`)
Niko Matsakis [Fri, 17 Mar 2017 13:37:18 +0000 (09:37 -0400)]
add an `ObligationCauseCode` we'll use later (`ReturnNoExpression`)

7 years agoadd a `TypeVariableOrigin` we'll use later (`DerivingFn`)
Niko Matsakis [Fri, 17 Mar 2017 13:36:44 +0000 (09:36 -0400)]
add a `TypeVariableOrigin` we'll use later (`DerivingFn`)

7 years agoadd some debug logs to type_variable.rs
Niko Matsakis [Fri, 17 Mar 2017 13:35:50 +0000 (09:35 -0400)]
add some debug logs to type_variable.rs

7 years agochange the strategy for diverging types
Niko Matsakis [Fri, 3 Mar 2017 02:15:26 +0000 (21:15 -0500)]
change the strategy for diverging types

The new strategy is as follows. First, the `!` type is assigned
in two cases:

- a block with a diverging statement and no tail expression (e.g.,
  `{return;}`);
- any expression with the type `!` is considered diverging.

Second, we track when we are in a diverging state, and we permit a value
of any type to be coerced **into** `!` if the expression that produced
it is diverging. This means that `fn foo() -> ! { panic!(); 22 }`
type-checks, even though the block has a type of `usize`.

Finally, coercions **from** the `!` type to any other are always
permitted.

Fixes #39808.

7 years agorefactor the `targeted_by_break` field
Niko Matsakis [Wed, 22 Mar 2017 15:40:29 +0000 (11:40 -0400)]
refactor the `targeted_by_break` field

In master, this field was an arbitrary node-id (in fact, an id for
something that doesn't even exist in the HIR -- the `catch` node).
Breaks targeting this block used that id. In the newer system, this
field is a boolean, and any breaks targeted this block will use the
id of the block.

7 years agoremove unneeded `&` that now fails to coerce
Niko Matsakis [Thu, 30 Mar 2017 03:52:45 +0000 (23:52 -0400)]
remove unneeded `&` that now fails to coerce

cc https://github.com/rust-lang/rust/issues/40924

7 years agoupdate comment
Niko Matsakis [Thu, 9 Mar 2017 14:57:26 +0000 (09:57 -0500)]
update comment

7 years agorefactor if so that the "then type" is an expression
Niko Matsakis [Thu, 9 Mar 2017 14:53:00 +0000 (09:53 -0500)]
refactor if so that the "then type" is an expression

7 years agoAuto merge of #40597 - jseyfried:improve_span_expn_info, r=jseyfried
bors [Thu, 30 Mar 2017 06:48:52 +0000 (06:48 +0000)]
Auto merge of #40597 - jseyfried:improve_span_expn_info, r=jseyfried

macros: improve `Span`'s expansion information

This PR improves `Span`'s expansion information. More specifically:
 - It refactors AST node span construction to preserve expansion information.
   - Today, we only use the underlying tokens' `BytePos`s, throwing away the `ExpnId`s.
   - This improves the accuracy of AST nodes' expansion information, fixing #30506.
 - It refactors `span.expn_id: ExpnId` to `span.ctxt: SyntaxContext` and removes `ExpnId`.
   - This gives all tokens as much hygiene information as `Ident`s.
   - This is groundwork for procedural macros 2.0 `TokenStream` API.
   - This is also groundwork for declarative macros 2.0, which will need this hygiene information for some non-`Ident` tokens.
 - It simplifies processing of spans' expansion information throughout the compiler.
 - It fixes #40649.
 - It fixes #39450 and fixes part of #23480.

r? @nrc

7 years agoImprove `Path` spans.
Jeffrey Seyfried [Wed, 29 Mar 2017 07:17:18 +0000 (07:17 +0000)]
Improve `Path` spans.

7 years agoAuto merge of #40917 - aidanhs:aphs-no-appveyor-cache, r=aturon
bors [Thu, 30 Mar 2017 02:11:55 +0000 (02:11 +0000)]
Auto merge of #40917 - aidanhs:aphs-no-appveyor-cache, r=aturon

Disable appveyor cache

Reverts just appveyor part of https://github.com/rust-lang/rust/pull/40780. r? @aturon

7 years agoDisable appveyor cache
Aidan Hobson Sayers [Thu, 30 Mar 2017 00:33:45 +0000 (01:33 +0100)]
Disable appveyor cache

7 years agoAuto merge of #40911 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 29 Mar 2017 21:08:17 +0000 (21:08 +0000)]
Auto merge of #40911 - frewsxcv:rollup, r=frewsxcv

Rollup of 6 pull requests

- Successful merges: #40780, #40814, #40816, #40832, #40901, #40907
- Failed merges:

7 years agoRollup merge of #40907 - donniebishop:utf8_unchecked_docs, r=steveklabnik
Corey Farwell [Wed, 29 Mar 2017 20:53:33 +0000 (16:53 -0400)]
Rollup merge of #40907 - donniebishop:utf8_unchecked_docs, r=steveklabnik

Linked str in from_utf_unchecked

References #29375. Linked `str` in from_utf_unchecked's documentation to the docs for primitive `str`

7 years agoRollup merge of #40901 - MaloJaffre:fix-double-redirect, r=steveklabnik
Corey Farwell [Wed, 29 Mar 2017 20:53:32 +0000 (16:53 -0400)]
Rollup merge of #40901 - MaloJaffre:fix-double-redirect, r=steveklabnik

Avoid linking to a moved page in rust.html

7 years agoRollup merge of #40832 - pftbest:fix_msp430, r=stjepang
Corey Farwell [Wed, 29 Mar 2017 20:53:32 +0000 (16:53 -0400)]
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 #40816 - estebank:issue-38321, r=nikomatsakis
Corey Farwell [Wed, 29 Mar 2017 20:53:31 +0000 (16:53 -0400)]
Rollup merge of #40816 - estebank:issue-38321, r=nikomatsakis

Clarify suggetion for field used as method

Instead of

```rust
error: no method named `src_addr` found for type `&wire::ipv4::Repr` in the current scope
   --> src/wire/ipv4.rs:409:34
    |
409 |         packet.set_src_addr(self.src_addr());
    |                                  ^^^^^^^^
    |
note: did you mean to write `self.src_addr`?
   --> src/wire/ipv4.rs:409:34
    |
409 |         packet.set_src_addr(self.src_addr());
    |                                  ^^^^^^^^
```

present

```rust
error: no method named `src_addr` found for type `&wire::ipv4::Repr` in the current scope
   --> src/wire/ipv4.rs:409:34
    |
409 |         packet.set_src_addr(self.src_addr());
    |                                  ^^^^^^^^ field, not a method
    |
    = help: did you mean to write `self.src_addr` instead of `self.src_addr(...)`?
```

Fix #38321.

7 years agoRollup merge of #40814 - abonander:issue_39436, r=jseyfried
Corey Farwell [Wed, 29 Mar 2017 20:53:30 +0000 (16:53 -0400)]
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

7 years agoRollup merge of #40780 - aidanhs:aphs-cache-git-modules, r=alexcrichton
Corey Farwell [Wed, 29 Mar 2017 20:53:29 +0000 (16:53 -0400)]
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

7 years agoLinked str in from_utf_unchecked
Donnie Bishop [Wed, 29 Mar 2017 17:21:31 +0000 (13:21 -0400)]
Linked str in from_utf_unchecked

7 years agoAuto merge of #40899 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 29 Mar 2017 15:38:11 +0000 (15:38 +0000)]
Auto merge of #40899 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #40720, #40786, #40841, #40866, #40897
- Failed merges:

7 years agoAvoid linking to a moved page in rust.html
Malo Jaffré [Wed, 29 Mar 2017 13:38:47 +0000 (15:38 +0200)]
Avoid linking to a moved page in rust.html

7 years agoRollup merge of #40897 - irfanhudda:fix-typo-char, r=BurntSushi
Corey Farwell [Wed, 29 Mar 2017 12:57:08 +0000 (08:57 -0400)]
Rollup merge of #40897 - irfanhudda:fix-typo-char, r=BurntSushi

Fix typo in libcore/char.rs

7 years agoRollup merge of #40866 - projektir:once_docs, r=estebank
Corey Farwell [Wed, 29 Mar 2017 12:57:07 +0000 (08:57 -0400)]
Rollup merge of #40866 - projektir:once_docs, r=estebank

Adding linking for Once docs #29377

Linking everything around `Once`, `ONCE_INIT`, and `OnceState`.

7 years agoRollup merge of #40841 - arielb1:immutable-blame, r=pnkfelix
Corey Farwell [Wed, 29 Mar 2017 12:57:06 +0000 (08:57 -0400)]
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

7 years agoRollup merge of #40786 - frewsxcv:unstable-book-remaining-features, r=steveklabnik
Corey Farwell [Wed, 29 Mar 2017 12:57:04 +0000 (08:57 -0400)]
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

7 years agoRollup merge of #40720 - mitsuhiko:feature/rev-key, r=BurntSushi
Corey Farwell [Wed, 29 Mar 2017 12:57:03 +0000 (08:57 -0400)]
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.

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 agoFix typo in libcore/char.rs
Irfan Hudda [Wed, 29 Mar 2017 11:20:09 +0000 (16:50 +0530)]
Fix typo in libcore/char.rs

7 years agoRefactor how spans are combined in the parser.
Jeffrey Seyfried [Wed, 15 Mar 2017 00:22:48 +0000 (00:22 +0000)]
Refactor how spans are combined in the parser.

7 years agoMinor tweaks to retry utility
Aidan Hobson Sayers [Wed, 29 Mar 2017 09:47:43 +0000 (10:47 +0100)]
Minor tweaks to retry utility

7 years agoUpdated tracking issue for cmp::Reverse
Armin Ronacher [Wed, 29 Mar 2017 07:06:52 +0000 (09:06 +0200)]
Updated tracking issue for cmp::Reverse

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 agoAdding linking for Once docs #29377
projektir [Mon, 27 Mar 2017 20:10:44 +0000 (16:10 -0400)]
Adding linking for Once docs #29377

7 years agoAdd all unstable features to Unstable Book.
Corey Farwell [Sun, 19 Mar 2017 14:45:05 +0000 (10:45 -0400)]
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

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 agoSimplify labels and move tests to ui
Esteban Küber [Mon, 27 Mar 2017 21:54:15 +0000 (14:54 -0700)]
Simplify labels and move tests to ui

7 years agoAttempt to cache git modules
Aidan Hobson Sayers [Thu, 23 Mar 2017 23:33:15 +0000 (23:33 +0000)]
Attempt to cache git modules

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 agoMerge `ExpnId` and `SyntaxContext`.
Jeffrey Seyfried [Fri, 17 Mar 2017 04:04:41 +0000 (04:04 +0000)]
Merge `ExpnId` and `SyntaxContext`.

7 years agoRemove code in `syntax::codemap`.
Jeffrey Seyfried [Thu, 16 Mar 2017 10:31:36 +0000 (10:31 +0000)]
Remove code in `syntax::codemap`.

7 years agoMove `syntax::ext::hygiene` to `syntax_pos::hygiene`.
Jeffrey Seyfried [Thu, 16 Mar 2017 10:23:33 +0000 (10:23 +0000)]
Move `syntax::ext::hygiene` to `syntax_pos::hygiene`.

7 years agoChanged cmp::Reverse to unstable
Armin Ronacher [Tue, 28 Mar 2017 23:18:39 +0000 (01:18 +0200)]
Changed cmp::Reverse to unstable

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 agoRustdoc: test proper representation for `pub use` macros
Austin Bonander [Tue, 28 Mar 2017 07:02:19 +0000 (00:02 -0700)]
Rustdoc: test proper representation for `pub use` macros

7 years agoRustdoc: memoize `pub use`-reexported macros so they don't appear twice in docs
Austin Bonander [Fri, 24 Mar 2017 10:50:32 +0000 (03:50 -0700)]
Rustdoc: memoize `pub use`-reexported macros so they don't appear twice in docs

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 agolibcore: sort_unstable: remove unnecessary loop.
Vadzim Dambrouski [Tue, 28 Mar 2017 14:43:01 +0000 (17:43 +0300)]
libcore: sort_unstable: remove unnecessary loop.

`other` is guaranteed to be less than `2 * len`.

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