]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agorustc: T: 'empty always holds forall T.
Eduard-Mihai Burtescu [Tue, 6 Jun 2017 16:50:01 +0000 (19:50 +0300)]
rustc: T: 'empty always holds forall T.

7 years agoAuto merge of #42247 - durka:patch-41, r=arielb1
bors [Tue, 6 Jun 2017 14:46:26 +0000 (14:46 +0000)]
Auto merge of #42247 - durka:patch-41, r=arielb1

add playbot jokes to run-pass test

Some funny expressions that people pull out on IRC, that might actually be useful to test pathological parser behavior.

7 years agoincr.comp.: Make WorkProductId opaque so we don't accidentally rely on being able...
Michael Woerister [Tue, 6 Jun 2017 13:09:21 +0000 (15:09 +0200)]
incr.comp.: Make WorkProductId opaque so we don't accidentally rely on being able to reconstruct obj-file names from one.

7 years agoICH: Add some HashStable implementations.
Michael Woerister [Fri, 2 Jun 2017 15:34:24 +0000 (17:34 +0200)]
ICH: Add some HashStable implementations.

7 years agoICH: Make StableHashingContext work with any TyCtxt, not just the global one.
Michael Woerister [Fri, 2 Jun 2017 13:45:56 +0000 (15:45 +0200)]
ICH: Make StableHashingContext work with any TyCtxt, not just the global one.

7 years agoAuto merge of #42437 - Mark-Simulacrum:skip-no-doc, r=alexcrichton
bors [Tue, 6 Jun 2017 11:10:37 +0000 (11:10 +0000)]
Auto merge of #42437 - Mark-Simulacrum:skip-no-doc, r=alexcrichton

Skip documentation files without ``` when running markdown tests.

This should reduce the 'running 0 tests' noise in builds, and I believe this is a good heuristic for us to use.

cc @rust-lang/docs -- do we use the indented format for code blocks anywhere? Will we? If so, we shouldn't do this.

r? @alexcrichton

7 years agoAuto merge of #42436 - ollie27:win_spawn_name, r=alexcrichton
bors [Tue, 6 Jun 2017 08:38:50 +0000 (08:38 +0000)]
Auto merge of #42436 - ollie27:win_spawn_name, r=alexcrichton

Always quote program name in Command::spawn on Windows

[`CreateProcess`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425.aspx) will interpret args as part of the binary name if it
doesn't find the binary using just the unquoted name. For example if
`foo.exe` doesn't exist, `Command::new("foo").arg("bar").spawn()` will
try to launch `foo bar.exe` which is clearly not desired.

7 years agoGroup closure context ui tests
Tommy Ip [Tue, 6 Jun 2017 08:29:06 +0000 (09:29 +0100)]
Group closure context ui tests

7 years agoAdd additional ui tests for issue 26046
Tommy Ip [Tue, 6 Jun 2017 08:17:06 +0000 (09:17 +0100)]
Add additional ui tests for issue 26046

This tests the FnMut case.

7 years agoUpdate closure errors to emit context for FnMut
Tommy Ip [Tue, 6 Jun 2017 08:06:56 +0000 (09:06 +0100)]
Update closure errors to emit context for FnMut

It now handles both FnMut and FnOnce case.

7 years agoAuto merge of #42394 - ollie27:rustdoc_deref_box, r=QuietMisdreavus
bors [Tue, 6 Jun 2017 06:18:17 +0000 (06:18 +0000)]
Auto merge of #42394 - ollie27:rustdoc_deref_box, r=QuietMisdreavus

rustdoc: Hide `self: Box<Self>` in list of deref methods

These methods can never be called through deref so there is no point including them. For example you can't call [`into_boxed_bytes`](https://doc.rust-lang.org/nightly/std/string/struct.String.html#method.into_boxed_bytes) or [`into_string`](https://doc.rust-lang.org/nightly/std/string/struct.String.html#method.into_string) on `String`.

7 years agoAdd doc example for `CString::as_bytes`.
Corey Farwell [Tue, 6 Jun 2017 03:50:49 +0000 (23:50 -0400)]
Add doc example for `CString::as_bytes`.

7 years agoAdd doc example for `CString::as_bytes_with_nul`.
Corey Farwell [Tue, 6 Jun 2017 03:49:52 +0000 (23:49 -0400)]
Add doc example for `CString::as_bytes_with_nul`.

7 years agoAdd doc example for `CString::into_bytes_with_nul`.
Corey Farwell [Tue, 6 Jun 2017 03:48:13 +0000 (23:48 -0400)]
Add doc example for `CString::into_bytes_with_nul`.

7 years agoAdd doc example for `CString::into_bytes`.
Corey Farwell [Tue, 6 Jun 2017 03:46:44 +0000 (23:46 -0400)]
Add doc example for `CString::into_bytes`.

7 years agoAdd doc example for `CString::into_raw`.
Corey Farwell [Tue, 6 Jun 2017 03:42:13 +0000 (23:42 -0400)]
Add doc example for `CString::into_raw`.

7 years agoAuto merge of #41990 - qnighy:disallow-underscore-suffix-for-string-like-literals...
bors [Tue, 6 Jun 2017 02:56:17 +0000 (02:56 +0000)]
Auto merge of #41990 - qnighy:disallow-underscore-suffix-for-string-like-literals, r=nikomatsakis

Disallow underscore suffix for string-like literals.

This patch turns string/bytestring/char/byte literals followed by an underscore, like `"Foo"_`, to an error.

`scan_optional_raw_name` will parse `_` as a valid raw name, but it will be rejected by the parser. I also considered just stopping parsing when the suffix is `_`, but in that case `"Foo"_` will be lexed as two valid tokens.

Fixes the latter half of #41723.

7 years agosyntax_pos::Symbol should not implement Sync
Wesley Wiser [Tue, 6 Jun 2017 01:52:34 +0000 (21:52 -0400)]
syntax_pos::Symbol should not implement Sync

Fixes #42407

7 years agoAuto merge of #42452 - raphlinus:mx_job_default, r=alexcrichton
bors [Mon, 5 Jun 2017 21:42:19 +0000 (21:42 +0000)]
Auto merge of #42452 - raphlinus:mx_job_default, r=alexcrichton

[fuchsia] Track change of mx_job_default

The implementation of mx_job_default changed from a macro which
accessed the __magenta_job_default global variable to a proper
function call. This patch tracks that change.

7 years agotidy is an unnecessary roadblock to contributions
Alex Burka [Mon, 5 Jun 2017 21:02:55 +0000 (21:02 +0000)]
tidy is an unnecessary roadblock to contributions

7 years agoUse single quotes, and doc the Rc struct itself.
Ulysse Carion [Mon, 5 Jun 2017 19:07:54 +0000 (12:07 -0700)]
Use single quotes, and doc the Rc struct itself.

7 years ago[fuchsia] Track change of mx_job_default
Raph Levien [Mon, 5 Jun 2017 18:27:31 +0000 (11:27 -0700)]
[fuchsia] Track change of mx_job_default

The implementation of mx_job_default changed from a macro which
accessed the __magenta_job_default global variable to a proper
function call. This patch tracks that change.

7 years agofix tests
steveklabnik [Mon, 5 Jun 2017 17:14:31 +0000 (13:14 -0400)]
fix tests

7 years agoaddress review feedback
steveklabnik [Mon, 5 Jun 2017 17:09:19 +0000 (13:09 -0400)]
address review feedback

7 years agoAdd run-make test for Command::spawn on Windows
Oliver Middleton [Mon, 5 Jun 2017 16:57:32 +0000 (17:57 +0100)]
Add run-make test for Command::spawn on Windows

Make sure args aren't interpreted as part of the program name.

7 years agoAuto merge of #42414 - frewsxcv:frewsxcv/improve-cow-docs, r=QuietMisdreavus
bors [Mon, 5 Jun 2017 15:38:24 +0000 (15:38 +0000)]
Auto merge of #42414 - frewsxcv:frewsxcv/improve-cow-docs, r=QuietMisdreavus

Improve `Cow` method doc examples.

None

7 years agoAuto merge of #42383 - estebank:candidate-newline, r=arielb1
bors [Mon, 5 Jun 2017 13:07:38 +0000 (13:07 +0000)]
Auto merge of #42383 - estebank:candidate-newline, r=arielb1

Use multiline note for trait suggestion

7 years agoAdd ui tests for issue 26046
Tommy Ip [Mon, 5 Jun 2017 10:35:17 +0000 (11:35 +0100)]
Add ui tests for issue 26046

7 years agoBetter closure error message
Tommy Ip [Mon, 5 Jun 2017 10:14:48 +0000 (11:14 +0100)]
Better closure error message

Use tracked data introduced in #42196 to provide a better closure
error message by showing why a closure implements `FnOnce`.

```
error[E0525]: expected a closure that implements the `Fn` trait, but
this closure only implements `FnOnce`
 --> $DIR/issue_26046.rs:4:19
  |
4 |       let closure = move || {
  |  ___________________^
5 | |         vec
6 | |     };
  | |_____^
  |
note: closure is `FnOnce` because it moves the variable `vec` out of
its environment
 --> $DIR/issue_26046.rs:5:9
  |
5 |         vec
  |         ^^^

error: aborting due to previous error(s)
```

Fixes #26046

7 years agoDoc changes for assert macros
Michael Kohl [Mon, 5 Jun 2017 09:46:12 +0000 (16:46 +0700)]
Doc changes for assert macros

See #29381

7 years agodoc rewording
king6cong [Mon, 5 Jun 2017 02:56:16 +0000 (10:56 +0800)]
doc rewording

7 years agoSkip documentation files without ``` when running markdown tests.
Mark Simulacrum [Sun, 4 Jun 2017 23:55:50 +0000 (17:55 -0600)]
Skip documentation files without ``` when running markdown tests.

This should reduce the 'running 0 tests' noise in builds, and is a good
heuristic for us to use.

7 years agoAuto merge of #42426 - arthurprs:io_error, r=sfackler
bors [Sun, 4 Jun 2017 23:35:21 +0000 (23:35 +0000)]
Auto merge of #42426 - arthurprs:io_error, r=sfackler

Inline io::Error creation from ErrorKind

Faster and smaller code for mio and tokio (PRs on those to follow)

7 years agoAlways quote program name in Command::spawn on Windows
Oliver Middleton [Sun, 4 Jun 2017 20:47:24 +0000 (21:47 +0100)]
Always quote program name in Command::spawn on Windows

`CreateProcess` will interpret args as part of the binary name if it
doesn't find the binary using just the unquoted name. For example if
`foo.exe` doesn't exist, `Command::new("foo").arg("bar").spawn()` will
try to launch `foo bar.exe` which is clearly not desired.

7 years agoAuto merge of #42362 - estebank:type, r=arielb1
bors [Sun, 4 Jun 2017 20:16:09 +0000 (20:16 +0000)]
Auto merge of #42362 - estebank:type, r=arielb1

Show trait method signature when impl differs

When the trait's span is available, it is already being used, add a
`note` for the cases where the span isn't available:

<pre>
error[E0053]: <b>method `fmt` has an incompatible type for trait</b>
  --> $DIR/trait_type.rs:17:4
   |
17 |    fn fmt(&self, x: &str) -> () { }
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
   |
   = note: expected type `<b>fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error></b>`
              found type `<b>fn(&MyType, &str)</b>`

error[E0050]: <b>method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2</b>
  --> $DIR/trait_type.rs:21:11
   |
21 |    fn fmt(&self) -> () { }
   |           ^^^^^ expected 2 parameters, found 1
   |
   = note: `fmt` from trait: `<b>fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error></b>`

error[E0186]: <b>method `fmt` has a `&self` declaration in the trait, but not in the impl</b>
  --> $DIR/trait_type.rs:25:4
   |
25 |    fn fmt() -> () { }
   |    ^^^^^^^^^^^^^^^^^^ expected `&self` in impl
   |
   = note: `fmt` from trait: `<b>fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error></b>`

error[E0046]: <b>not all trait items implemented, missing: `fmt`</b>
  --> $DIR/trait_type.rs:28:1
   |
28 | impl std::fmt::Display for MyType4 {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
   |
   = note: `fmt` from trait: `<b>fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error></b>`
</code></pre>

Fix #28011.

7 years agoSeparate suggestion in a `help` and a `note`
Esteban Küber [Sun, 4 Jun 2017 00:06:46 +0000 (17:06 -0700)]
Separate suggestion in a `help` and a `note`

7 years agoShow trait method signature when impl differs
Esteban Küber [Thu, 1 Jun 2017 06:14:43 +0000 (23:14 -0700)]
Show trait method signature when impl differs

When the trait's span is available, it is already being used, add a
`note` for the cases where the span isn't available:

```
error[E0053]: method `fmt` has an incompatible type for trait
  --> $DIR/trait_type.rs:17:4
   |
17 |    fn fmt(&self, x: &str) -> () { }
   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
   |
   = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
              found type `fn(&MyType, &str)`

error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2
  --> $DIR/trait_type.rs:21:11
   |
21 |    fn fmt(&self) -> () { }
   |           ^^^^^ expected 2 parameters, found 1
   |
   = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`

error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl
  --> $DIR/trait_type.rs:25:4
   |
25 |    fn fmt() -> () { }
   |    ^^^^^^^^^^^^^^^^^^ expected `&self` in impl
   |
   = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`

error[E0046]: not all trait items implemented, missing: `fmt`
  --> $DIR/trait_type.rs:28:1
   |
28 | impl std::fmt::Display for MyType4 {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
   |
   = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
```

7 years agorustc_llvm: re-run build script if config.toml changes
Venkata Giri Reddy [Sun, 4 Jun 2017 18:35:57 +0000 (18:35 +0000)]
rustc_llvm: re-run build script if config.toml changes

7 years agoAuto merge of #42402 - citizen428:create-dump-mir-dir, r=Mark-Simulacrum
bors [Sun, 4 Jun 2017 17:51:46 +0000 (17:51 +0000)]
Auto merge of #42402 - citizen428:create-dump-mir-dir, r=Mark-Simulacrum

Create directory for dump-mir-dir automatically

Fixes #35543 r? @Mark-Simulacrum

@Mark-Simulacrum I know someone else said that they'll work on this, but it has been 3+ weeks and I had nothing to do and wanted to contribute a bit.

I now added the call to automatically create the directory as discussed, but was wondering how you feel about the suggestion to set a default directory, i.e. `target/mir`?

7 years agoinline io::Error creation from ErrorKind
arthurprs [Sun, 4 Jun 2017 17:45:44 +0000 (19:45 +0200)]
inline io::Error creation from ErrorKind

7 years agoUpdate mod.rs
bjorn3 [Sun, 4 Jun 2017 16:16:24 +0000 (18:16 +0200)]
Update mod.rs

7 years agoUpdate lowering.rs
bjorn3 [Sun, 4 Jun 2017 16:15:42 +0000 (18:15 +0200)]
Update lowering.rs

7 years agoUpdate def.rs
bjorn3 [Sun, 4 Jun 2017 16:15:19 +0000 (18:15 +0200)]
Update def.rs

7 years agoAuto merge of #42418 - tomprince:try-deploy, r=Mark-Simulacrum
bors [Sun, 4 Jun 2017 15:35:37 +0000 (15:35 +0000)]
Auto merge of #42418 - tomprince:try-deploy, r=Mark-Simulacrum

Upload linux-x86_64 artifacts on try branch.

This is an experiment to explore generating artifacts for testing with cargobmomb. See brson/cargobomb#64.

7 years agoAuto merge of #42406 - bjorn3:patch-1, r=eddyb
bors [Sun, 4 Jun 2017 12:36:11 +0000 (12:36 +0000)]
Auto merge of #42406 - bjorn3:patch-1, r=eddyb

Some doc comments

7 years agoDon't run travis tests on master.
Mark Simulacrum [Sat, 3 Jun 2017 18:49:03 +0000 (12:49 -0600)]
Don't run travis tests on master.

This saves us builders for more helpful purposes.

7 years agoAuto merge of #42265 - Zoxc:for-sugar, r=eddyb
bors [Sun, 4 Jun 2017 05:44:39 +0000 (05:44 +0000)]
Auto merge of #42265 - Zoxc:for-sugar, r=eddyb

Change for-loop desugar to not borrow the iterator during the loop

This is enables the use of suspend points inside for-loops in movable generators. This is illegal in the current desugaring as `iter` is borrowed across the body.

7 years agoExplicate what "Rc" and "Arc" stand for.
Ulysse Carion [Sun, 4 Jun 2017 04:30:13 +0000 (21:30 -0700)]
Explicate what "Rc" and "Arc" stand for.

7 years agoAuto merge of #41968 - kennytm:fix-unreadable-json-test-output-36516, r=nikomatsakis
bors [Sun, 4 Jun 2017 03:23:39 +0000 (03:23 +0000)]
Auto merge of #41968 - kennytm:fix-unreadable-json-test-output-36516, r=nikomatsakis

Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516.

<del>`ui-run` test is a combination of `ui` test and `run-pass` test. It is used to test lint output.</del>

Added support of `// run-pass` header to `ui` tests.

The compiler message of each test must match the corresponding `*.stderr` file like the traditional `ui` tests. Additionally, the compiled output must be executed successfully like the `run-pass` test.

12 `run-pass`/`run-pass-fulldeps` tests are moved to `ui`/`ui-fulldeps` plus the headers. After this move, no `run-pass`/`run-pass-fulldeps` tests should rely on the compiler's JSON message. This allows us to stop passing `--error-format json` in run-pass tests, thus fixing #36516.

7 years agoCreate directory for dump-mir-dir automatically
Michael Kohl [Sat, 3 Jun 2017 07:38:45 +0000 (14:38 +0700)]
Create directory for dump-mir-dir automatically

Fixes #35543

7 years agoDeploy linux-x86_64 artifacts on try branch.
Tom Prince [Sun, 4 Jun 2017 01:06:22 +0000 (19:06 -0600)]
Deploy linux-x86_64 artifacts on try branch.

7 years agoAuto merge of #42398 - redox-os:master, r=sfackler
bors [Sun, 4 Jun 2017 01:06:23 +0000 (01:06 +0000)]
Auto merge of #42398 - redox-os:master, r=sfackler

Redox: Switch to repr(C) for syscall structs

7 years agoAuto merge of #42391 - photoszzt:master, r=Manishearth
bors [Sat, 3 Jun 2017 22:49:11 +0000 (22:49 +0000)]
Auto merge of #42391 - photoszzt:master, r=Manishearth

Better suggestion for unknown method

r? @Manishearth

fixes #42386

7 years agoAuto merge of #42387 - GuillaumeGomez:error-codes-next, r=Susurrus
bors [Sat, 3 Jun 2017 20:31:11 +0000 (20:31 +0000)]
Auto merge of #42387 - GuillaumeGomez:error-codes-next, r=Susurrus

Add E0603 error code

Part of #42229.

cc @Susurrus

7 years agoRemove 'elided' from lifetime resolution error
Stephen Lazaro [Sat, 3 Jun 2017 19:14:42 +0000 (12:14 -0700)]
Remove 'elided' from lifetime resolution error

Removes 'elided' from lifetime resolution errors
Removes 'elided' from relevant error messaging tests

7 years ago Improve doc example for `Cow::to_mut`.
Corey Farwell [Sat, 3 Jun 2017 18:54:17 +0000 (14:54 -0400)]
 Improve doc example for `Cow::to_mut`.

7 years agoImprove doc examples for `Cow::into_owned`.
Corey Farwell [Sat, 3 Jun 2017 18:40:23 +0000 (14:40 -0400)]
Improve doc examples for `Cow::into_owned`.

7 years agoAuto merge of #42369 - RalfJung:drop-glue, r=eddyb
bors [Sat, 3 Jun 2017 18:02:57 +0000 (18:02 +0000)]
Auto merge of #42369 - RalfJung:drop-glue, r=eddyb

array drop glue: avoid using out-of-bounds index lvalues

Avoid using out-of-bounds index lvalues. Miri doesn't like them, and they seem fishy in general.
Instead, use a pointer cast to compute the address of the beginning, and Offset to compute the end.

Cc @arielb1 @nagisa

7 years agoAdd doc comments to librustc/infer/region_inference/mod.rs
bjorn3 [Sat, 3 Jun 2017 16:37:29 +0000 (18:37 +0200)]
Add doc comments to librustc/infer/region_inference/mod.rs

7 years agoRemove leftover? of old code
bjorn3 [Sat, 3 Jun 2017 16:34:59 +0000 (18:34 +0200)]
Remove leftover? of old code

7 years agoDoc comments for librustc/hir/lowering.rs
bjorn3 [Sat, 3 Jun 2017 16:26:20 +0000 (18:26 +0200)]
Doc comments for librustc/hir/lowering.rs

7 years agoAdd single doc comment to librustc/hir/def_id.rs
bjorn3 [Sat, 3 Jun 2017 16:21:43 +0000 (18:21 +0200)]
Add single doc comment to librustc/hir/def_id.rs

7 years agoBetter docs for librustc/hir/def.rs
bjorn3 [Sat, 3 Jun 2017 16:18:32 +0000 (18:18 +0200)]
Better docs for librustc/hir/def.rs

7 years agoModule doc comment for librustc/dep_graph/safe.rs
bjorn3 [Sat, 3 Jun 2017 16:04:37 +0000 (18:04 +0200)]
Module doc comment for librustc/dep_graph/safe.rs

7 years agoMake some comments docs in librustc/dep_graph/dep_node.rs
bjorn3 [Sat, 3 Jun 2017 15:59:07 +0000 (17:59 +0200)]
Make some comments docs in librustc/dep_graph/dep_node.rs

7 years agoAuto merge of #42334 - est31:master, r=jseyfried
bors [Sat, 3 Jun 2017 15:40:34 +0000 (15:40 +0000)]
Auto merge of #42334 - est31:master, r=jseyfried

Extend the unused macro lint to macros 2.0

Extends the unused macro lint (added in PR #41907) to macros 2.0 (added in PR #40847).

r? @jseyfried

7 years agoAuto merge of #42396 - venkatagiri:remove_lifetime_extn, r=arielb1
bors [Sat, 3 Jun 2017 13:17:20 +0000 (13:17 +0000)]
Auto merge of #42396 - venkatagiri:remove_lifetime_extn, r=arielb1

rustc: remove temporary lifetime extension by borrow hint

closes #39283.

Thanks to @nikomatsakis for mentoring on this one.

r? @arielb1

7 years agoAuto merge of #42332 - michaelwoerister:no-more-retracing, r=nikomatsakis
bors [Sat, 3 Jun 2017 10:56:42 +0000 (10:56 +0000)]
Auto merge of #42332 - michaelwoerister:no-more-retracing, r=nikomatsakis

incr.comp.: Use DefPathHash-based DepNodes in the serialized DepGraph and remove obsolete DefIdDirectory

With this PR we don't store the dep-graph as a set of `DepNode<IndexIntoDefIdDirectory>` anymore but instead as a set of `DepNode<DefPathHash>`. Since a `DefPathHash` is a global identifier that is valid across compilation sessions, we don't need the `DefIdDirectory` anymore.

Since a `DepNode<DefPathHash>` is bigger than a `DepNode<IndexIntoDefIdDirectory>` and our on-disk encoding of the dep-graph is inefficient, this PR will probably increase the amount of space the dep-graph takes up on disk. I'm in the process of gathering some performance data.

The changes in here are a step towards implementing ICH-based `DepNodes` (#42294).

r? @nikomatsakis

7 years agoAuto merge of #42331 - retep998:standard-relocation-coupon, r=alexcrichton
bors [Sat, 3 Jun 2017 08:32:58 +0000 (08:32 +0000)]
Auto merge of #42331 - retep998:standard-relocation-coupon, r=alexcrichton

Improve reallocation in alloc_system on Windows

Fixes https://github.com/rust-lang/rust/issues/42025

7 years agoAuto merge of #42400 - frewsxcv:rollup, r=frewsxcv
bors [Sat, 3 Jun 2017 06:13:05 +0000 (06:13 +0000)]
Auto merge of #42400 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #42353, #42354, #42363, #42368, #42382
- Failed merges:

7 years agoRollup merge of #42382 - alexcrichton:remove-rustflags, r=Mark-Simulacrum
Corey Farwell [Sat, 3 Jun 2017 05:00:55 +0000 (01:00 -0400)]
Rollup merge of #42382 - alexcrichton:remove-rustflags, r=Mark-Simulacrum

rustbuild: Remove RUSTFLAGS logic in rustc shim

This was added in #38072 but I can't recall why and AFAIK Cargo already handles
this. This was discovered through #42146 where passing duplicate flags was
causing problems.

7 years agoRollup merge of #42368 - estebank:call-site, r=nikomatsakis
Corey Farwell [Sat, 3 Jun 2017 05:00:54 +0000 (01:00 -0400)]
Rollup merge of #42368 - estebank:call-site, r=nikomatsakis

Use callsite's span for macro calls on suggestion

When suggesting an appropriate mutability for a macro call, use the call
span instead of the expanded macro's span.

```
error[E0308]: mismatched types
  --> $DIR/coerce-suggestions.rs:48:9
   |
48 |     s = format!("foo");
   |         ^^^^^^^^^^^^^^ expected mutable reference, found struct `std::string::String`
   |
   = note: expected type `&mut std::string::String`
              found type `std::string::String`
   = help: try with `&mut format!("foo")`
   = note: this error originates in a macro outside of the current crate
```
Fix #41858.

7 years agoRollup merge of #42363 - cuviper:no-fail-fast, r=alexcrichton
Corey Farwell [Sat, 3 Jun 2017 05:00:53 +0000 (01:00 -0400)]
Rollup merge of #42363 - cuviper:no-fail-fast, r=alexcrichton

rustbuild: Add `./x.py test --no-fail-fast`

This option forwards to each `cargo test` invocation, and applies the
same logic across all test steps to keep going after failures.  At the
end, a brief summary line reports how many commands failed, if any.

Note that if a test program fails to even start at all, or if an
auxiliary build command related to testing fails, these are still left
to stop everything right away.

Fixes #40219.

7 years agoRollup merge of #42354 - Mark-Simulacrum:reduce-verbosity, r=alexcrichton
Corey Farwell [Sat, 3 Jun 2017 05:00:52 +0000 (01:00 -0400)]
Rollup merge of #42354 - Mark-Simulacrum:reduce-verbosity, r=alexcrichton

Reduce verbosity of build logs

This does two separate things.
 - Sets sccache logging to warn instead of info.
 - Makes tests when running for a given PR (not on auto branch) quiet. (cc @eddyb)

r? @alexcrichton

7 years agoRollup merge of #42353 - steveklabnik:update-books, r=GuillaumeGomez
Corey Farwell [Sat, 3 Jun 2017 05:00:51 +0000 (01:00 -0400)]
Rollup merge of #42353 - steveklabnik:update-books, r=GuillaumeGomez

Update various book repos for the next release.

7 years agoAuto merge of #41953 - Aaronepower:patch-1, r=brson
bors [Sat, 3 Jun 2017 03:57:13 +0000 (03:57 +0000)]
Auto merge of #41953 - Aaronepower:patch-1, r=brson

Updated releases notes for 1.18

This is my first time making the release notes so please give it an extra once over!

7 years agoSwitch to repr(C) for syscall structs
Jeremy Soller [Sat, 3 Jun 2017 02:30:20 +0000 (20:30 -0600)]
Switch to repr(C) for syscall structs

7 years agoBetter suggestion for unknown method
zzhu [Fri, 2 Jun 2017 20:20:36 +0000 (13:20 -0700)]
Better suggestion for unknown method

Fixes #42386

7 years agorustc: remove temporary lifetime extension by borrow hint
Venkata Giri Reddy [Fri, 2 Jun 2017 23:43:50 +0000 (23:43 +0000)]
rustc: remove temporary lifetime extension by borrow hint

7 years agoAuto merge of #42381 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Fri, 2 Jun 2017 22:19:08 +0000 (22:19 +0000)]
Auto merge of #42381 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 10 pull requests

- Successful merges: #41981, #42225, #42310, #42319, #42335, #42343, #42355, #42360, #42370, #42372
- Failed merges:

7 years agorustdoc: Hide `self: Box<Self>` in list of deref methods
Oliver Middleton [Fri, 2 Jun 2017 21:37:11 +0000 (22:37 +0100)]
rustdoc: Hide `self: Box<Self>` in list of deref methods

These methods can never be called through deref so there is no point
including them. For example you can't call `into_boxed_bytes` or
`into_string` on `String`.

7 years agoAdd E0603 error code
Guillaume Gomez [Fri, 2 Jun 2017 19:38:52 +0000 (21:38 +0200)]
Add E0603 error code

7 years agoAuto merge of #42189 - nikomatsakis:chalk-trait-env-param-env, r=eddyb
bors [Fri, 2 Jun 2017 19:23:14 +0000 (19:23 +0000)]
Auto merge of #42189 - nikomatsakis:chalk-trait-env-param-env, r=eddyb

querify layout and move param env out of the infcx

The main goal of this PR is to move the parameter environment *out* of the inference context. This is because the inference environment will soon be changing over the course of inference --- for example, when we enter into a `for<'a> fn(...)` type, we will push a new environment with an increasing universe index, rather than skolemizing the `'a` references. Similarly, each obligation will soon be able to have a distinct parameter environment, and therefore the `Obligation` struct is extended to carry a `ParamEnv<'tcx>`. (I debated about putting it into the cause; seems plausible, but also weird.)

Along the way, I also reworked how layout works, moving the layout cache into a proper query along the lines of needs-drop and friends.

Finally, tweaks the inference context API. It seemed to be accumulating parameters at an alarming rate. The main way to e.g. make a subtype or equality relationship is to do the following:

    infcx.at(cause, param_env).sub(a, b)
    infcx.at(cause, param_env).eq(a, b)

In both cases, `a` is considered the "expected" type (this used to be specified by a boolean). I tried hard to preserve the existing notion of what was "expected", although in some cases I'm not convinced it was being set on purpose one way or the other. This is why in some cases you will see me do `sup(b, a)`, which is otherwise equivalent to `sub(a, b)`, but sets the "expected type" differently.

r? @eddyb
cc @arielb1

7 years agoAdd separate GDB pretty-printer for empty structs
gentoo90 [Fri, 2 Jun 2017 18:18:45 +0000 (21:18 +0300)]
Add separate GDB pretty-printer for empty structs

Use a class without children() method for printing empty structs.
Presence of this method makes GDB's variable objects interface act like
if the struct had children.

7 years agoAdd E0602
Guillaume Gomez [Thu, 1 Jun 2017 21:25:13 +0000 (23:25 +0200)]
Add E0602

7 years agoQuiet tests on PR tests
Mark Simulacrum [Thu, 1 Jun 2017 15:48:48 +0000 (09:48 -0600)]
Quiet tests on PR tests

7 years agoVec<T> is pronounced 'vec'
Manish Goregaokar [Fri, 2 Jun 2017 17:59:19 +0000 (10:59 -0700)]
Vec<T> is pronounced 'vec'

7 years agoReduce sccache log level.
Mark Simulacrum [Thu, 1 Jun 2017 15:45:33 +0000 (09:45 -0600)]
Reduce sccache log level.

7 years agoUse multiline note for trait suggestion
Esteban Küber [Fri, 2 Jun 2017 17:15:13 +0000 (10:15 -0700)]
Use multiline note for trait suggestion

7 years agorustbuild: Remove RUSTFLAGS logic in rustc shim
Alex Crichton [Fri, 2 Jun 2017 16:57:20 +0000 (09:57 -0700)]
rustbuild: Remove RUSTFLAGS logic in rustc shim

This was added in #38072 but I can't recall why and AFAIK Cargo already handles
this. This was discovered through #42146 where passing duplicate flags was
causing problems.

7 years agorustbuild: Add `./x.py test --no-fail-fast`
Josh Stone [Fri, 2 Jun 2017 16:27:44 +0000 (09:27 -0700)]
rustbuild: Add `./x.py test --no-fail-fast`

This option forwards to each `cargo test` invocation, and applies the
same logic across all test steps to keep going after failures.  At the
end, a brief summary line reports how many commands failed, if any.

Note that if a test program fails to even start at all, or if an
auxiliary build command related to testing fails, these are still left
to stop everything right away.

Fixes #40219.

7 years agocompiletest: Force directive to be first complete word in header comment.
kennytm [Wed, 24 May 2017 08:11:32 +0000 (16:11 +0800)]
compiletest: Force directive to be first complete word in header comment.

Refactored some related code to take advantage of this change.

7 years agoIntroduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516.
kennytm [Sat, 13 May 2017 09:54:50 +0000 (17:54 +0800)]
Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516.

The 'run-pass' header cause a 'ui' test to execute the result. It is used
to test the lint output, at the same time ensure those lints won't cause
the source code to become compile-fail.

12 run-pass/run-pass-fulldeps tests gained the header and are moved to
ui/ui-fulldeps. After this move, no run-pass/run-pass-fulldeps tests should
rely on the compiler's JSON message. This allows us to stop passing
`--error-format json` in run-pass tests, thus fixing #36516.

7 years agoRollup merge of #42372 - frewsxcv:frewsxcv/improve-receiver-docs, r=QuietMisdreavus
Mark Simulacrum [Fri, 2 Jun 2017 15:10:49 +0000 (09:10 -0600)]
Rollup merge of #42372 - frewsxcv:frewsxcv/improve-receiver-docs, r=QuietMisdreavus

Rewrite a couple `Receiver` doc examples.

None

7 years agoRollup merge of #42370 - mbrubeck:docs, r=frewsxcv
Mark Simulacrum [Fri, 2 Jun 2017 15:10:48 +0000 (09:10 -0600)]
Rollup merge of #42370 - mbrubeck:docs, r=frewsxcv

Add [[T]] -> [T] examples to SliceConcatExt docs

None

7 years agoRollup merge of #42360 - ollie27:rustdoc_vector_rename, r=GuillaumeGomez
Mark Simulacrum [Fri, 2 Jun 2017 15:10:47 +0000 (09:10 -0600)]
Rollup merge of #42360 - ollie27:rustdoc_vector_rename, r=GuillaumeGomez

rustdoc: Rename `Vector` and `FixedVector` to `Slice` and `Array`

Also store the array length as a usize rather than a String.

This is just a minor refactor.

7 years agoRollup merge of #42355 - bjorn3:patch-1, r=Mark-Simulacrum
Mark Simulacrum [Fri, 2 Jun 2017 15:10:46 +0000 (09:10 -0600)]
Rollup merge of #42355 - bjorn3:patch-1, r=Mark-Simulacrum

Syntax highlight rust code in librustc/dep_graph/README.md

7 years agoRollup merge of #42343 - cuviper:install-executables, r=alexcrichton
Mark Simulacrum [Fri, 2 Jun 2017 15:10:45 +0000 (09:10 -0600)]
Rollup merge of #42343 - cuviper:install-executables, r=alexcrichton

Update rust-installer for Windows executable mode

It now marks a few whitelisted extensions as executable in the tarball,
so Windows packages can be extracted on other platforms and directly
execute install.sh.

It also includes a fix for the chmod on bulk dirs, so now the html docs
won't be marked executable en masse.

Fixes #42121
r? @alexcrichton

7 years agoRollup merge of #42335 - jcowgill:fingerprint-be, r=michaelwoerister
Mark Simulacrum [Fri, 2 Jun 2017 15:10:44 +0000 (09:10 -0600)]
Rollup merge of #42335 - jcowgill:fingerprint-be, r=michaelwoerister

Don't byteswap Fingerprints when encoding

Byteswapping Fingerprints when encoding is unnessesary and breaks if the Fingerprint is later decoded on a machine with different endianness to the one it was encoded on.

Fixes #42239

This PR fixes a regression caused by #42082. @michaelwoerister

7 years agoRollup merge of #42319 - Manishearth:const-extern, r=nikomatsakis
Mark Simulacrum [Fri, 2 Jun 2017 15:10:43 +0000 (09:10 -0600)]
Rollup merge of #42319 - Manishearth:const-extern, r=nikomatsakis

Improve error message for const extern fn

It's currently ``error: unmatched visibility `pub` ``, which is a nonsensical error in this context.