]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agorustfmt syntax::parse
Tshepang Lekhonkhobe [Wed, 27 Jan 2016 19:42:26 +0000 (21:42 +0200)]
rustfmt syntax::parse

8 years agoAuto merge of #31206 - nrc:early-save, r=nikomatsakis
bors [Wed, 27 Jan 2016 10:17:55 +0000 (10:17 +0000)]
Auto merge of #31206 - nrc:early-save, r=nikomatsakis

r? @nikomatsakis

8 years agoAuto merge of #31020 - regexident:fix_16884, r=brson
bors [Wed, 27 Jan 2016 07:32:00 +0000 (07:32 +0000)]
Auto merge of #31020 - regexident:fix_16884, r=brson

Changes error message from displaying first found missing constructor witness to showing up to 10, if necessary.

Fixes issue #16884.

8 years agoAuto merge of #30859 - aliclark:musl-nx-issue, r=brson
bors [Wed, 27 Jan 2016 03:30:14 +0000 (03:30 +0000)]
Auto merge of #30859 - aliclark:musl-nx-issue, r=brson

This explicitly adds an option telling the linker on these platforms to make the stack and heap non-executable (should already be the case for Windows, and likely OS X).

Without this option there is some risk of accidentally losing NX protection, as the linker will not enable NX if any of the binary's constituent objects don't contain the .note.GNU-stack header.

We're not aware of any users who would want a binary with executable stack or heap, but in future this could be made possible by passing a flag to disable the protection, which would also help document the fact to the crate's users.

Edit: older discussion of previous quickfix to add a .note.GNU-stack header to libunwind's assembly:

Short term solution for issue #30824 to ensure that object files generated from assembler contain the .note.GNU-stack header.

When this header is not present in any constituent object files, the linker refrains from making the stack NX in the final executable.

Further actions:

I'll try to get this change merged in with upstream too, and then update these instructions to just compile the fixed version.

It seems a good idea to use issue #30824 or some other issue to add a test that similar security regressions can be automatically caught in future.

8 years agoAuto merge of #30487 - jonas-schievink:more-attrs-lint-fixes, r=alexcrichton
bors [Wed, 27 Jan 2016 01:30:28 +0000 (01:30 +0000)]
Auto merge of #30487 - jonas-schievink:more-attrs-lint-fixes, r=alexcrichton

`LateContext` already does this, looks like this was just forgotten in #29850.

Found while investigating #30326 (but doesn't fix it)

8 years agoAuto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson
bors [Tue, 26 Jan 2016 22:10:10 +0000 (22:10 +0000)]
Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson

This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today

8 years agoAuto merge of #31081 - alexcrichton:stabilize-hasher, r=aturon
bors [Tue, 26 Jan 2016 19:30:54 +0000 (19:30 +0000)]
Auto merge of #31081 - alexcrichton:stabilize-hasher, r=aturon

This commit implements the stabilization of the custom hasher support intended
for 1.7 but left out due to some last-minute questions that needed some
decisions. A summary of the actions done in this PR are:

Stable

* `std::hash::BuildHasher`
* `BuildHasher::Hasher`
* `BuildHasher::build_hasher`
* `std::hash::BuildHasherDefault`
* `HashMap::with_hasher`
* `HashMap::with_capacity_and_hasher`
* `HashSet::with_hasher`
* `HashSet::with_capacity_and_hasher`
* `std::collections::hash_map::RandomState`
* `RandomState::new`

Deprecated

* `std::collections::hash_state`
* `std::collections::hash_state::HashState` - this trait was also moved into
  `std::hash` with a reexport here to ensure that we can have a blanket impl to
  prevent immediate breakage on nightly. Note that this is unstable in both
  location.
* `HashMap::with_hash_state` - renamed
* `HashMap::with_capacity_and_hash_state` - renamed
* `HashSet::with_hash_state` - renamed
* `HashSet::with_capacity_and_hash_state` - renamed

Closes #27713

8 years agoFix warnings during tests
Alex Crichton [Sat, 23 Jan 2016 07:49:57 +0000 (23:49 -0800)]
Fix warnings during tests

The deny(warnings) attribute is now enabled for tests so we need to weed out
these warnings as well.

8 years agoAuto merge of #30402 - jooert:prettypanic, r=alexcrichton
bors [Tue, 26 Jan 2016 16:50:27 +0000 (16:50 +0000)]
Auto merge of #30402 - jooert:prettypanic, r=alexcrichton

This splits the output of panics into two lines as proposed in #15239 and adds a
note about how to get a backtrace. Because the default panic message consists of
multiple lines now, this changes the test runner's failure output to not indent
the first line anymore.

Fixes #15239 and fixes #11704.

8 years agostd: Stabilize custom hasher support in HashMap
Alex Crichton [Thu, 21 Jan 2016 18:28:39 +0000 (10:28 -0800)]
std: Stabilize custom hasher support in HashMap

This commit implements the stabilization of the custom hasher support intended
for 1.7 but left out due to some last-minute questions that needed some
decisions. A summary of the actions done in this PR are:

Stable

* `std::hash::BuildHasher`
* `BuildHasher::Hasher`
* `BuildHasher::build_hasher`
* `std::hash::BuildHasherDefault`
* `HashMap::with_hasher`
* `HashMap::with_capacity_and_hasher`
* `HashSet::with_hasher`
* `HashSet::with_capacity_and_hasher`
* `std::collections::hash_map::RandomState`
* `RandomState::new`

Deprecated

* `std::collections::hash_state`
* `std::collections::hash_state::HashState` - this trait was also moved into
  `std::hash` with a reexport here to ensure that we can have a blanket impl to
  prevent immediate breakage on nightly. Note that this is unstable in both
  location.
* `HashMap::with_hash_state` - renamed
* `HashMap::with_capacity_and_hash_state` - renamed
* `HashSet::with_hash_state` - renamed
* `HashSet::with_capacity_and_hash_state` - renamed

Closes #27713

8 years agoAuto merge of #31214 - Manishearth:rollup, r=Manishearth
bors [Tue, 26 Jan 2016 13:26:08 +0000 (13:26 +0000)]
Auto merge of #31214 - Manishearth:rollup, r=Manishearth

- Successful merges: #31172, #31177, #31211
- Failed merges:

8 years agoRollup merge of #31211 - Manishearth:pr-30765, r=nrc
Manish Goregaokar [Tue, 26 Jan 2016 13:25:39 +0000 (18:55 +0530)]
Rollup merge of #31211 - Manishearth:pr-30765, r=nrc

r? @eddyb or @nrc

8 years agoRollup merge of #31177 - alexcrichton:no-stdio, r=sfackler
Manish Goregaokar [Tue, 26 Jan 2016 13:25:39 +0000 (18:55 +0530)]
Rollup merge of #31177 - alexcrichton:no-stdio, r=sfackler

On all platforms, reading from stdin where the actual stdin isn't present should
return 0 bytes as having been read rather than the entire buffer.

On Windows, handle the case where we're inheriting stdio handles but one of them
isn't present. Currently the behavior is to fail returning an I/O error but
instead this commit corrects it to detecting this situation and propagating the
non-set handle.

Closes #31167

8 years agoRollup merge of #31172 - SimonSapin:patch-17, r=sfackler
Manish Goregaokar [Tue, 26 Jan 2016 13:25:39 +0000 (18:55 +0530)]
Rollup merge of #31172 - SimonSapin:patch-17, r=sfackler

The previous example did not do what its description said. In it panicked on integer overflow in debug mode, and went into an infinite loop in release mode (wrapping back to 0 after printing 254).

8 years agoRangeFrom::step_by docs: fix example
Simon Sapin [Sun, 24 Jan 2016 23:56:34 +0000 (00:56 +0100)]
RangeFrom::step_by docs: fix example

The previous example did not do what its description said. In it panicked on integer overflow in debug mode, and went into an infinite loop in release mode (wrapping back to 0 after printing 254).

8 years agoAuto merge of #31105 - jseyfried:fix_lexical_scoping, r=nrc
bors [Tue, 26 Jan 2016 11:24:18 +0000 (11:24 +0000)]
Auto merge of #31105 - jseyfried:fix_lexical_scoping, r=nrc

This fixes #23880, a scoping bug in which items in a block are shadowed by local variables and type parameters that are in scope.

After this PR, an item in a block will shadow any local variables or type parameters above the item in the scope hierarchy. Items in a block will continue to be shadowed by local variables in the same block (even if the item is defined after the local variable).

This is a [breaking-change]. For example, the following code breaks:
```rust
fn foo() {
    let mut f = 1;
    {
        fn f() {}
        f += 1; // This will resolve to the function instead of the local variable
    }
}

8 years agoAdd message about RUST_BACKTRACE to default output of panic!
Johannes Oertel [Mon, 25 Jan 2016 17:16:43 +0000 (18:16 +0100)]
Add message about RUST_BACKTRACE to default output of panic!

The note will only be shown on the first panic.

8 years agoAuto merge of #31160 - nxnfufunezn:ppwild-31073, r=eddyb
bors [Tue, 26 Jan 2016 09:33:18 +0000 (09:33 +0000)]
Auto merge of #31160 - nxnfufunezn:ppwild-31073, r=eddyb

Fixes #31073
r? @eddyb

8 years agoImprove error message for let-in-expr-position
Manish Goregaokar [Tue, 26 Jan 2016 08:23:28 +0000 (13:53 +0530)]
Improve error message for let-in-expr-position

8 years agoMake emitter handle DUMMY_SP correctly
Manish Goregaokar [Tue, 26 Jan 2016 08:19:21 +0000 (13:49 +0530)]
Make emitter handle DUMMY_SP correctly

8 years agoAuto merge of #31210 - Manishearth:rollup, r=Manishearth
bors [Tue, 26 Jan 2016 07:42:10 +0000 (07:42 +0000)]
Auto merge of #31210 - Manishearth:rollup, r=Manishearth

- Successful merges: #31152, #31184, #31189, #31192, #31197, #31199, #31201
- Failed merges:

8 years agoRollup merge of #31201 - steveklabnik:gh30633, r=alexcrichton
Manish Goregaokar [Tue, 26 Jan 2016 07:41:58 +0000 (13:11 +0530)]
Rollup merge of #31201 - steveklabnik:gh30633, r=alexcrichton

Fixes #30633

8 years agoRollup merge of #31199 - steveklabnik:gh31181, r=Manishearth
Manish Goregaokar [Tue, 26 Jan 2016 07:41:58 +0000 (13:11 +0530)]
Rollup merge of #31199 - steveklabnik:gh31181, r=Manishearth

Fixes #31181

8 years agoRollup merge of #31197 - apasel422:issue-31195, r=steveklabnik
Manish Goregaokar [Tue, 26 Jan 2016 07:41:57 +0000 (13:11 +0530)]
Rollup merge of #31197 - apasel422:issue-31195, r=steveklabnik

Closes #31195

r? @steveklabnik

8 years agoRollup merge of #31192 - frewsxcv:patch-27, r=alexcrichton
Manish Goregaokar [Tue, 26 Jan 2016 07:41:57 +0000 (13:11 +0530)]
Rollup merge of #31192 - frewsxcv:patch-27, r=alexcrichton

8 years agoRollup merge of #31189 - ollie27:book_links, r=steveklabnik
Manish Goregaokar [Tue, 26 Jan 2016 07:41:57 +0000 (13:11 +0530)]
Rollup merge of #31189 - ollie27:book_links, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #31184 - arielb1:remove-implicator, r=nikomatsakis
Manish Goregaokar [Tue, 26 Jan 2016 07:41:57 +0000 (13:11 +0530)]
Rollup merge of #31184 - arielb1:remove-implicator, r=nikomatsakis

it is pre-RFC1214 junk and completely useless.

r? @nikomatsakis

8 years agoRollup merge of #31152 - durka:ty-follow-bracket, r=pnkfelix
Manish Goregaokar [Tue, 26 Jan 2016 07:41:57 +0000 (13:11 +0530)]
Rollup merge of #31152 - durka:ty-follow-bracket, r=pnkfelix

cc #31135 rust-lang/rfcs#1462 #30923 @retep998
r? @pnkfelix

8 years agorebasing
Nick Cameron [Tue, 26 Jan 2016 05:28:31 +0000 (18:28 +1300)]
rebasing

8 years agoInitial work towards abort-free compilation
Nick Cameron [Thu, 21 Jan 2016 00:19:20 +0000 (13:19 +1300)]
Initial work towards abort-free compilation

The goal is that the compiler will pass `Result`s around rather than using abort_if_errors. To preserve behaviour we currently abort at the top level. I've removed all other aborts from the driver, but haven't touched any of the nested aborts.

8 years agoResolve: fix #23880, a scoping bug
Jeffrey Seyfried [Fri, 22 Jan 2016 09:55:29 +0000 (09:55 +0000)]
Resolve: fix #23880, a scoping bug

This fixes a bug in which items in a block are shadowed by local variables and type parameters that are in scope.
It is a [breaking-change]. For example, the following code breaks:

```rust
fn foo() {
    let mut f = 1;
    {
        fn f() {}
        f += 1; // This will now resolve to the function instead of the local variable
    }
}
```

Any breakage can be fixed by renaming the item that is no longer shadowed.

8 years agoDescribe next_back() wrt Iterator protocol
Steve Klabnik [Tue, 26 Jan 2016 03:37:00 +0000 (22:37 -0500)]
Describe next_back() wrt Iterator protocol

Fixes #30633

8 years agoMention the need for a linker
Steve Klabnik [Tue, 26 Jan 2016 03:26:56 +0000 (22:26 -0500)]
Mention the need for a linker

Fixes #31181

8 years agoFix typo in "Loops" section of the book
Andrew Paseltiner [Tue, 26 Jan 2016 02:33:23 +0000 (21:33 -0500)]
Fix typo in "Loops" section of the book

Closes #31195

8 years agostd: Fix some behavior without stdio handles
Alex Crichton [Mon, 25 Jan 2016 05:14:56 +0000 (21:14 -0800)]
std: Fix some behavior without stdio handles

On all platforms, reading from stdin where the actual stdin isn't present should
return 0 bytes as having been read rather than the entire buffer.

On Windows, handle the case where we're inheriting stdio handles but one of them
isn't present. Currently the behavior is to fail returning an I/O error but
instead this commit corrects it to detecting this situation and propagating the
non-set handle.

Closes #31167

8 years agoAuto merge of #31065 - nrc:ident-correct, r=pnkfelix
bors [Tue, 26 Jan 2016 00:42:08 +0000 (00:42 +0000)]
Auto merge of #31065 - nrc:ident-correct, r=pnkfelix

This PR adds some minor error correction to the parser - if there is a missing ident, we recover and carry on. It also makes compilation more robust so that non-fatal errors (which is still most of them, unfortunately) in parsing do not cause us to abort compilation. The effect is that a program with a missing or incorrect ident can get all the way to type checking.

8 years agoRefCell::borrow_mut example should demonstrate mut
Corey Farwell [Mon, 25 Jan 2016 22:07:55 +0000 (17:07 -0500)]
RefCell::borrow_mut example should demonstrate mut

8 years agoAuto merge of #31097 - DanielJCampbell:SaveAnalysis, r=nrc
bors [Mon, 25 Jan 2016 20:41:44 +0000 (20:41 +0000)]
Auto merge of #31097 - DanielJCampbell:SaveAnalysis, r=nrc

Also altered the format_args! syntax extension, and \#[derive(debug)], to maintain compatability.
r? @ nrc

8 years agoReplace link to learn-rust in the book
Oliver Middleton [Mon, 25 Jan 2016 18:40:28 +0000 (18:40 +0000)]
Replace link to learn-rust in the book

It was removed in #30595.
Also delete the old learn-rust.md.

8 years agoFix link to hello-cargo in the book
Oliver Middleton [Mon, 25 Jan 2016 18:34:34 +0000 (18:34 +0000)]
Fix link to hello-cargo in the book

It was moved in #29538.

8 years agoFix a rebasing issue and addressed reviewer comment
Nick Cameron [Thu, 21 Jan 2016 19:55:54 +0000 (08:55 +1300)]
Fix a rebasing issue and addressed reviewer comment

8 years agoAuto merge of #30899 - oli-obk:non-local-const-fn, r=pnkfelix
bors [Mon, 25 Jan 2016 16:42:41 +0000 (16:42 +0000)]
Auto merge of #30899 - oli-obk:non-local-const-fn, r=pnkfelix

Also got rid of some code repetition in `const_eval`

8 years agoFix pretty_printer to print omitted type `_` marker
nxnfufunezn [Thu, 21 Jan 2016 18:44:36 +0000 (13:44 -0500)]
Fix pretty_printer to print omitted type `_` marker

8 years agodo not additionally note about unexpected identifier after unexpected let
Daan Sprenkels [Thu, 14 Jan 2016 15:52:24 +0000 (16:52 +0100)]
do not additionally note about unexpected identifier after unexpected let
error, by moving unexpected let check into the proper if-else clause

8 years agoUpdate qquote.rs test case and make unexpected `let` error fatal
Daan Sprenkels [Thu, 14 Jan 2016 15:04:35 +0000 (16:04 +0100)]
Update qquote.rs test case and make unexpected `let` error fatal

8 years agolibsyntax: move check for keyword Let to a more logical spot
Daan Sprenkels [Thu, 7 Jan 2016 23:01:59 +0000 (00:01 +0100)]
libsyntax: move check for keyword Let to a more logical spot

8 years agolibsyntax: note that `let a = (let b = something)` is invalid
Daan Sprenkels [Wed, 6 Jan 2016 22:58:45 +0000 (23:58 +0100)]
libsyntax: note that `let a = (let b = something)` is invalid
in parse_bottom_expr (parser.rs)

8 years agoremove implicator
Ariel Ben-Yehuda [Mon, 25 Jan 2016 13:17:31 +0000 (15:17 +0200)]
remove implicator

it is pre-RFC1214 junk

8 years agoAuto merge of #31182 - adrianheine:master, r=pnkfelix
bors [Mon, 25 Jan 2016 12:41:19 +0000 (12:41 +0000)]
Auto merge of #31182 - adrianheine:master, r=pnkfelix

In 95d904625b4d45af80b4e40d51a3a0fde1abaa8a output was accidentally moved
from STDERR to STDOUT.

This commit also changes the order of debug output. Previously, it was:

```
/* id 22: … */ {
  …
}
DEBUG:rustc::middle::dataflow:
```

Now, it is:

```
DEBUG:rustc::middle::dataflow: /* id 22: … */ {
  …
}
```

8 years agoAuto merge of #31176 - frewsxcv:incorrect-pass-kind, r=dotdash
bors [Mon, 25 Jan 2016 09:37:11 +0000 (09:37 +0000)]
Auto merge of #31176 - frewsxcv:incorrect-pass-kind, r=dotdash

Register LLVM passes with the correct LLVM pass manager.

LLVM was upgraded to a new version in this commit:

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf

which was part of this pull request:

https://github.com/rust-lang/rust/issues/26025

Consider the following two lines from that commit:

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL462

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL469

The purpose of these lines is to register LLVM passes. Prior to the that
commit, the passes being handled were assumed to be ModulePasses (a
specific type of LLVM pass) since they were being added to a ModulePass
manager. After that commit, both lines were refactored (presumably in an
attempt to DRY out the code), but the ModulePasses were changed to be
registered to a FunctionPass manager. This change resulted in
ModulePasses being run, but a Function object was being passed as a
parameter to the pass instead of a Module, which resulted in
segmentation faults.

In this commit, I changed relevant sections of the code to check the
type of the passes being added and register them to the appropriate pass
manager.

Closes https://github.com/rust-lang/rust/issues/31067

8 years agolibrustc/middle/dataflow.rs: Debug to STDERR
Adrian Heine [Mon, 25 Jan 2016 08:59:52 +0000 (09:59 +0100)]
librustc/middle/dataflow.rs: Debug to STDERR

In 95d904625b4d45af80b4e40d51a3a0fde1abaa8a output was accidentally moved
from STDERR to STDOUT.

This commit also changes the order of debug output. Previously, it was:

```
/* id 22: … */ {
  …
}
DEBUG:rustc::middle::dataflow:
```

Now, it is:

```
DEBUG:rustc::middle::dataflow: /* id 22: … */ {
  …
}
```

8 years agoRegister LLVM passes with the correct LLVM pass manager.
Corey Farwell [Mon, 25 Jan 2016 01:22:24 +0000 (20:22 -0500)]
Register LLVM passes with the correct LLVM pass manager.

LLVM was upgraded to a new version in this commit:

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf

which was part of this pull request:

https://github.com/rust-lang/rust/issues/26025

Consider the following two lines from that commit:

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL462

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL469

The purpose of these lines is to register LLVM passes. Prior to the that
commit, the passes being handled were assumed to be ModulePasses (a
specific type of LLVM pass) since they were being added to a ModulePass
manager. After that commit, both lines were refactored (presumably in an
attempt to DRY out the code), but the ModulePasses were changed to be
registered to a FunctionPass manager. This change resulted in
ModulePasses being run, but a Function object was being passed as a
parameter to the pass instead of a Module, which resulted in
segmentation faults.

In this commit, I changed relevant sections of the code to check the
type of the passes being added and register them to the appropriate pass
manager.

Closes https://github.com/rust-lang/rust/issues/31067

8 years agorustc_mir: Mark the crate as unstable
Alex Crichton [Fri, 22 Jan 2016 18:17:07 +0000 (10:17 -0800)]
rustc_mir: Mark the crate as unstable

Wouldn't want to be able to link to this on stable Rust!

8 years agomk: Move from `-D warnings` to `#![deny(warnings)]`
Alex Crichton [Thu, 21 Jan 2016 23:26:19 +0000 (15:26 -0800)]
mk: Move from `-D warnings` to `#![deny(warnings)]`

This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today

8 years agoAuto merge of #31159 - dirk:dirk/clarify-cargo-lock, r=steveklabnik
bors [Mon, 25 Jan 2016 01:16:45 +0000 (01:16 +0000)]
Auto merge of #31159 - dirk:dirk/clarify-cargo-lock, r=steveklabnik

Also remove a "finally" in the section about building for release to make it feel a bit friendlier.

8 years agoAuto merge of #31166 - geofft:process-comments, r=alexcrichton
bors [Sun, 24 Jan 2016 23:27:10 +0000 (23:27 +0000)]
Auto merge of #31166 - geofft:process-comments, r=alexcrichton

The implementation changed in 33a2191d, but the comments did not change to match.

r? @alexcrichton

8 years agoAuto merge of #31093 - tshepang:misc-doc-improvements, r=steveklabnik
bors [Sun, 24 Jan 2016 20:13:14 +0000 (20:13 +0000)]
Auto merge of #31093 - tshepang:misc-doc-improvements, r=steveklabnik

8 years agoAuto merge of #31162 - mopp:fix_configure_for_new_clang, r=alexcrichton
bors [Sun, 24 Jan 2016 18:09:51 +0000 (18:09 +0000)]
Auto merge of #31162 - mopp:fix_configure_for_new_clang, r=alexcrichton

Version of Clang in repository is 3.9

So, error is caused by
```
./configure --enable-dist-host-only --enable-clang
```
Then, I got
```
configure: error: bad CLANG version: 3.9.0 (http://llvm.org/git/clang.git 3d5d4c39659f11dfbe8e11c857cadf5c449b559b) (http://llvm.org/git/llvm.git, need >=3.0svn
```

I fixed this issue by appending 3.9* in the if sentence.
Thanks.

8 years agosys/unix/process.rs: Update comments in make_argv and make_envp
Geoffrey Thomas [Wed, 20 Jan 2016 22:12:28 +0000 (17:12 -0500)]
sys/unix/process.rs: Update comments in make_argv and make_envp

The implementation changed in 33a2191d, but the comments did not change
to match.

8 years agoAuto merge of #30932 - arielb1:raw-const-errors, r=nagisa
bors [Sun, 24 Jan 2016 15:16:20 +0000 (15:16 +0000)]
Auto merge of #30932 - arielb1:raw-const-errors, r=nagisa

Fixes #30705

r? @nagisa

8 years ago Improve the error explanations for check_const
Ariel Ben-Yehuda [Sun, 24 Jan 2016 15:16:04 +0000 (17:16 +0200)]
 Improve the error explanations for check_const

Fixes #30705

8 years agofix condition for clang
mopp [Sun, 24 Jan 2016 10:36:02 +0000 (19:36 +0900)]
fix condition for clang

8 years agodoc: miscellaneous OpenOptions:append improvements
Tshepang Lekhonkhobe [Thu, 21 Jan 2016 21:41:06 +0000 (23:41 +0200)]
doc: miscellaneous OpenOptions:append improvements

8 years agoClarify when `Cargo.lock` is created by `cargo build` in the book
Dirk Gadsden [Sun, 24 Jan 2016 04:39:38 +0000 (23:39 -0500)]
Clarify when `Cargo.lock` is created by `cargo build` in the book

Also remove a "finally" in the section about building for release
to make it feel a bit friendlier.

8 years agoadd `[` to FOLLOW(ty) and FOLLOW(path)
Alex Burka [Sat, 23 Jan 2016 18:38:18 +0000 (13:38 -0500)]
add `[` to FOLLOW(ty) and FOLLOW(path)

Following RFC 1462 (amending 550). Closes #31135.

8 years agothorough follow-set tests
Alex Burka [Sat, 23 Jan 2016 18:37:54 +0000 (13:37 -0500)]
thorough follow-set tests

8 years agoAuto merge of #31148 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 23 Jan 2016 16:21:07 +0000 (16:21 +0000)]
Auto merge of #31148 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #30997, #31019, #31031, #31035, #31045, #31050, #31054, #31055, #31061, #31088, #31090, #31111, #31113, #31128, #31130, #31136, #31145, #31146
- Failed merges: #30932

8 years agoRollup merge of #31146 - angelsl:patch-1, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:44 +0000 (09:38 -0500)]
Rollup merge of #31146 - angelsl:patch-1, r=steveklabnik

8 years agoRollup merge of #31145 - D101101:patch-1, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:44 +0000 (09:38 -0500)]
Rollup merge of #31145 - D101101:patch-1, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #31136 - mbrubeck:btree-doc, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:44 +0000 (09:38 -0500)]
Rollup merge of #31136 - mbrubeck:btree-doc, r=steveklabnik

Also change the examples to make this more obvious. Fixes #31129.

8 years agoRollup merge of #31130 - marcbowes:master, r=nrc
Steve Klabnik [Sat, 23 Jan 2016 14:38:44 +0000 (09:38 -0500)]
Rollup merge of #31130 - marcbowes:master, r=nrc

E0210 explains about orphan rules and suggests using a local type as a workaround. It wasn't obvious to me that I couldn't use a type alias, so I added a note.

8 years agoRollup merge of #31128 - kamalmarhubi:book-trait-impl-clarify, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:44 +0000 (09:38 -0500)]
Rollup merge of #31128 - kamalmarhubi:book-trait-impl-clarify, r=steveklabnik

8 years agoRollup merge of #31113 - steveklabnik:master, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:43 +0000 (09:38 -0500)]
Rollup merge of #31113 - steveklabnik:master, r=alexcrichton

r? @alexcrichton

8 years agoRollup merge of #31111 - apasel422:issue-31103, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:43 +0000 (09:38 -0500)]
Rollup merge of #31111 - apasel422:issue-31103, r=steveklabnik

Closes #31103

r? @steveklabnik

8 years agoRollup merge of #31090 - tshepang:improve-sentence, r=brson
Steve Klabnik [Sat, 23 Jan 2016 14:38:43 +0000 (09:38 -0500)]
Rollup merge of #31090 - tshepang:improve-sentence, r=brson

8 years agoRollup merge of #31088 - tshepang:grammar, r=brson
Steve Klabnik [Sat, 23 Jan 2016 14:38:43 +0000 (09:38 -0500)]
Rollup merge of #31088 - tshepang:grammar, r=brson

8 years agoRollup merge of #31061 - brson:bib, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31061 - brson:bib, r=steveklabnik

8 years agoRollup merge of #31055 - steveklabnik:alt-tags, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31055 - steveklabnik:alt-tags, r=alexcrichton

8 years agoRollup merge of #31054 - steveklabnik:a11y, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31054 - steveklabnik:a11y, r=alexcrichton

I've been interested in the accessibility of Rustdoc's output, but never did anything about it. Today, I ran a tool, and it suggested adjusting some colors.

Here's some screen shots. Before:
![2016-01-20-114944_443x199_scrot](https://cloud.githubusercontent.com/assets/27786/12455979/d84d7ae8-bf6b-11e5-9aea-0602fb1a8cfa.png)

After:

![2016-01-20-114516_453x204_scrot](https://cloud.githubusercontent.com/assets/27786/12455841/36a55d14-bf6b-11e5-8014-239594c12e46.png)

As you can see, the link text is just a _shade_ darker.

Browsable: http://www.steveklabnik.com/rust-a11y-doc-testing/doc/std/

8 years agoRollup merge of #31050 - apasel422:issue-31048, r=Manishearth
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31050 - apasel422:issue-31048, r=Manishearth

Closes #31048

r? @Manishearth

8 years agoRollup merge of #31045 - Manishearth:diag-prim-shadow, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31045 - Manishearth:diag-prim-shadow, r=steveklabnik

I tried to add an inline `span_suggestion()` to the error as well, but since generics don't have their own span it becomes too fragile/complicated to work.

r? @steveklabnik

fixes #19477

8 years agoRollup merge of #31035 - nathankleyn:improve-visibility-of-entry-api, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #31035 - nathankleyn:improve-visibility-of-entry-api, r=steveklabnik

Responding to [a thread of discussion on the Rust subreddit](https://www.reddit.com/r/rust/comments/3racik/mutable_lifetimes_are_too_long_when_matching_an/),
it was identified that the presence of the Entry API is not duly
publicised. This commit aims to add some reasonable examples of
common usages of this API to the main example secion of the `HashMap`
documentation.

This is part of issue #29348.

8 years agoRollup merge of #31031 - brson:issue-30123, r=nikomatsakis
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #31031 - brson:issue-30123, r=nikomatsakis

This was fixed in passing. Adding a regression test.

8 years agoRollup merge of #31019 - andreabedini:patch-1, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #31019 - andreabedini:patch-1, r=alexcrichton

Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()`
to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that.

(First PR, be nice :)

8 years agoRollup merge of #30997 - bluss:trait-default, r=nikomatsakis
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #30997 - bluss:trait-default, r=nikomatsakis

Fix type parameter default error to mention type and trait definitions

Introduced in PR #30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.

8 years agoAuto merge of #30997 - bluss:trait-default, r=nikomatsakis
bors [Sat, 23 Jan 2016 14:31:26 +0000 (14:31 +0000)]
Auto merge of #30997 - bluss:trait-default, r=nikomatsakis

Fix type parameter default error to mention type and trait definitions

Introduced in PR #30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.

8 years agoSemaphore not sempahore
angelsl [Sat, 23 Jan 2016 14:15:59 +0000 (22:15 +0800)]
Semaphore not sempahore

8 years agoAuto merge of #31121 - Manishearth:prim-link, r=alexcrichton
bors [Sat, 23 Jan 2016 11:38:43 +0000 (11:38 +0000)]
Auto merge of #31121 - Manishearth:prim-link, r=alexcrichton

We currently nest `<a>` tags which is doubleplusungood. So, for example, `(u8, u8)` will show up
with the left paren linked to the tuple primitive page, and the right paren unlinked, which looks ugly.

8 years agoHandle generics in raw pointers
Manish Goregaokar [Sat, 23 Jan 2016 09:31:17 +0000 (15:01 +0530)]
Handle generics in raw pointers

8 years agoAuto merge of #30958 - dhodder:master, r=brson
bors [Sat, 23 Jan 2016 09:49:34 +0000 (09:49 +0000)]
Auto merge of #30958 - dhodder:master, r=brson

The COPYRIGHT file should be updated to note that Rust no longer ships with AUTHORS.txt.

    $ git log -1 -- AUTHORS.txt
    commit 402749c539edcbc2d850ac3a782cace8661c68e6
    Author: Brian Anderson <banderson@mozilla.com>
    Date:   Wed Dec 2 22:16:08 2015 +0000

        Remove AUTHORS.txt and add-authors.sh

        Keeping this file up to date requires hours of work every release,
        even with the script. It is a fool's errand and we shall not do it
        any longer.

8 years agoFix the missing line in the guessing-game.md
Sergey Veselkov [Sat, 23 Jan 2016 09:19:11 +0000 (12:19 +0300)]
Fix the missing line in the guessing-game.md

r? @steveklabnik

8 years agoAuto merge of #30807 - kolloch:patch-1, r=steveklabnik
bors [Sat, 23 Jan 2016 07:44:17 +0000 (07:44 +0000)]
Auto merge of #30807 - kolloch:patch-1, r=steveklabnik

When I read the book, the following sentence of the reference documentation helped me greatly to understand slices:

"Slices are a view into a block of memory represented as a pointer and a length."

In this commit, I tried to integrate the gist of that into the slice section inside of "primitive-types.md". I am not a native speaker, so feel very free to improve the wording.

r? @steveklabnik

8 years agoAuto merge of #31126 - arielb1:remote-errors, r=eddyb
bors [Sat, 23 Jan 2016 05:54:38 +0000 (05:54 +0000)]
Auto merge of #31126 - arielb1:remote-errors, r=eddyb

Also removed an unused and similarly buggy error path.

Fixes #30535

r? @eddyb

8 years agoAuto merge of #31124 - dirk:dirk/display-and-error-impls-for-string-parse-error,...
bors [Sat, 23 Jan 2016 04:04:26 +0000 (04:04 +0000)]
Auto merge of #31124 - dirk:dirk/display-and-error-impls-for-string-parse-error, r=alexcrichton

Fixes #31106.

- [ ] I wasn't sure of the correct `#[stable(...)]` definition to use here. Happy to fix it if it's incorrect.
- [ ] `ParseError` is sort of an ephemeral non-error, but do let me know if the implementation of `error::Error` for it should return something more descriptive than "parse error".

8 years agoAuto merge of #31116 - bluss:expect-out-cold, r=alexcrichton
bors [Sat, 23 Jan 2016 00:33:23 +0000 (00:33 +0000)]
Auto merge of #31116 - bluss:expect-out-cold, r=alexcrichton

Use cold functions for panic formatting Option::expect, Result::unwrap, expect

These methods are marked inline, but insert a big chunk of formatting
code, as well as other error path related code, such as
deallocating a std::io::Error if you have one.

We can explicitly separate out that code path into a function that is
never inline, since the panicking case should always be rare.

8 years agorevert an unrelated flag addition for freebsd
Ali Clark [Fri, 22 Jan 2016 23:41:59 +0000 (23:41 +0000)]
revert an unrelated flag addition for freebsd

8 years agoAuto merge of #31104 - nrc:save-fix-variant-data, r=alexcrichton
bors [Fri, 22 Jan 2016 22:42:33 +0000 (22:42 +0000)]
Auto merge of #31104 - nrc:save-fix-variant-data, r=alexcrichton

8 years agoDocument that BTreeMap iteration is in order
Matt Brubeck [Fri, 22 Jan 2016 22:10:59 +0000 (14:10 -0800)]
Document that BTreeMap iteration is in order

Also change the examples to make this more obvious. Fixes #31129.

8 years agoAuto merge of #31095 - alexcrichton:remove-old-files, r=brson
bors [Fri, 22 Jan 2016 20:51:38 +0000 (20:51 +0000)]
Auto merge of #31095 - alexcrichton:remove-old-files, r=brson

These are either not used at all today or they're super old and haven't been used in ages, so clean them out.

8 years agoE0210: Add a warning about type aliases
Marc Bowes [Fri, 22 Jan 2016 20:20:36 +0000 (22:20 +0200)]
E0210: Add a warning about type aliases

E0210 explains about orphan rules and suggests using a local type as a
workaround. It wasn't obvious to me that I couldn't use a type
alias, so I added a note.