]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAuto merge of #42481 - brson:wingnu, r=alexcrichton
bors [Thu, 8 Jun 2017 06:02:04 +0000 (06:02 +0000)]
Auto merge of #42481 - brson:wingnu, r=alexcrichton

Fix setting PATH during linkage on windows-gnu

This makes the behavior almost exactly the same as before the VS2017 patch, except that on MSVC builds the host bin path is no longer added to PATH. I am not sure that's actually necessary on any platform.

r? @alexcrichton

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

7 years agobootstrap: further clarify build --help
Ralf Jung [Thu, 8 Jun 2017 05:08:48 +0000 (22:08 -0700)]
bootstrap: further clarify build --help

7 years agoAuto merge of #42522 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 8 Jun 2017 03:46:16 +0000 (03:46 +0000)]
Auto merge of #42522 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #42470, #42490, #42497, #42510, #42512
- Failed merges:

7 years agoMake rustdoc.js use license comments.
Clar Charr [Tue, 30 May 2017 04:17:11 +0000 (00:17 -0400)]
Make rustdoc.js use license comments.

7 years agoRollup merge of #42512 - Keruspe:master, r=alexcrichton
Corey Farwell [Thu, 8 Jun 2017 01:58:46 +0000 (21:58 -0400)]
Rollup merge of #42512 - Keruspe:master, r=alexcrichton

update git2

Fixes build with libressl

7 years agoRollup merge of #42510 - mbrubeck:docs, r=QuietMisdreavus
Corey Farwell [Thu, 8 Jun 2017 01:58:45 +0000 (21:58 -0400)]
Rollup merge of #42510 - mbrubeck:docs, r=QuietMisdreavus

Update step_by docs to say iterator instead of range

None

7 years agoRollup merge of #42497 - qnighy:just-use-try-in-three-places, r=eddyb
Corey Farwell [Thu, 8 Jun 2017 01:58:45 +0000 (21:58 -0400)]
Rollup merge of #42497 - qnighy:just-use-try-in-three-places, r=eddyb

Replace some matches with try.

This patch just replaces `match`es with `?` in the compiler, which I came across when I'm reading the parser.

7 years agoRollup merge of #42490 - gaurikholkar:master, r=eddyb
Corey Farwell [Thu, 8 Jun 2017 01:58:44 +0000 (21:58 -0400)]
Rollup merge of #42490 - gaurikholkar:master, r=eddyb

Changing error message from `contains interior mutability` to `may contain interior mutability`

Fixes #40313 . I have changed the message from `contains interior mutability` to `may contain interior mutability` for the following example
```
use std::cell::Cell;
use std::panic::catch_unwind;
fn main() {
    let mut x = Cell::new(22);
    catch_unwind(|| { x.set(23); });
}
```
which has been added as a ui test.

Also, the message [here](https://github.com/gaurikholkar/rust/blob/master/src/librustc_mir/transform/qualify_consts.rs#L666) and it's respective `compile-fail` test have been modified.

cc @nikomatsakis  @Mark-Simulacrum  @eddyb

7 years agoRollup merge of #42470 - frewsxcv:frewsxcv/ffi-cstr-doc-examples, r=QuietMisdreavus
Corey Farwell [Thu, 8 Jun 2017 01:58:43 +0000 (21:58 -0400)]
Rollup merge of #42470 - frewsxcv:frewsxcv/ffi-cstr-doc-examples, r=QuietMisdreavus

Add doc examples for `CString` methods.

None

7 years agoAuto merge of #40706 - irfanhudda:doc-next-power-of-two, r=alexcrichton
bors [Thu, 8 Jun 2017 01:07:08 +0000 (01:07 +0000)]
Auto merge of #40706 - irfanhudda:doc-next-power-of-two, r=alexcrichton

Improve documentation of next_power_of_two

Clarify overflow behavior of `next_power_of_two`.

Related Issue: #18604

7 years agocore: allow messages in unimplemented!() macro
Sean McArthur [Thu, 8 Jun 2017 00:06:55 +0000 (17:06 -0700)]
core: allow messages in unimplemented!() macro

7 years agoAuto merge of #42447 - alexcrichton:update-cargo, r=petrochenkov
bors [Wed, 7 Jun 2017 22:48:15 +0000 (22:48 +0000)]
Auto merge of #42447 - alexcrichton:update-cargo, r=petrochenkov

Update Cargo

Brings in some perf improvements!

7 years agoCover all cases in closure errors
Tommy Ip [Wed, 7 Jun 2017 20:26:28 +0000 (21:26 +0100)]
Cover all cases in closure errors

7 years agoupdate git2
Marc-Antoine Perennou [Wed, 7 Jun 2017 19:42:17 +0000 (21:42 +0200)]
update git2

Fixes build with libressl

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoUpdate docs to say iterator instead of range
Matt Brubeck [Wed, 7 Jun 2017 16:24:35 +0000 (09:24 -0700)]
Update  docs to say iterator instead of range

7 years agoAuto merge of #42378 - steveklabnik:rustdoc-docs, r=frewsxcv
bors [Wed, 7 Jun 2017 15:16:46 +0000 (15:16 +0000)]
Auto merge of #42378 - steveklabnik:rustdoc-docs, r=frewsxcv

The Rustdoc book

A work-in-progress start for docs for rustdoc.

This doesn't actually generate the docs yet; I wanted to open this PR to get feedback on this approach, the chapters headings themselves, and to see if anyone wanted to help fill in the ones that aren't done yet.

Start of #42322.

/cc @rust-lang/dev-tools @rust-lang/docs

7 years agoUpdate Cargo
Alex Crichton [Mon, 5 Jun 2017 16:36:48 +0000 (09:36 -0700)]
Update Cargo

Brings in some perf improvements!

7 years agoFix translation of external spans.
Inokentiy Babushkin [Wed, 7 Jun 2017 14:17:11 +0000 (16:17 +0200)]
Fix translation of external spans.

7 years agoAuto merge of #42486 - eddyb:issue-39882, r=nikomatsakis
bors [Wed, 7 Jun 2017 12:34:13 +0000 (12:34 +0000)]
Auto merge of #42486 - eddyb:issue-39882, r=nikomatsakis

rustc_trans: do not store pair fields if they are ZSTs.

Should help with #39882 even if it's not a complete fix AFAICT.

7 years agoAllocate DefIndices for global crate metadata.
Michael Woerister [Wed, 7 Jun 2017 08:45:20 +0000 (10:45 +0200)]
Allocate DefIndices for global crate metadata.

This allows for treating global crate metadata the same as regular metadata with regard to incr. comp.

7 years agoAuto merge of #42482 - eddyb:issue-42467, r=nikomatsakis
bors [Wed, 7 Jun 2017 10:09:11 +0000 (10:09 +0000)]
Auto merge of #42482 - eddyb:issue-42467, r=nikomatsakis

rustc: T: 'empty always holds for all types.

Fixes #42467 by special-casing `ReEmpty` to always hold, even for parameters.
The reason this is the case is that `ReEmpty` is the result of inferring a region variable with no constraints attached to it, so there is no lifetime a type would contain which would be strictly shorter.

r? @nikomatsakis

7 years agoindentation fixes
gaurikholkar [Wed, 7 Jun 2017 09:22:21 +0000 (02:22 -0700)]
indentation fixes

7 years agoChange `llvm.neon.*` to `llvm.arm.neon.*` in the mapping for platform intrinsics
Henri Sivonen [Wed, 7 Jun 2017 08:17:16 +0000 (11:17 +0300)]
Change `llvm.neon.*` to `llvm.arm.neon.*` in the mapping for platform intrinsics

This avoids linker errors when using platform intrinsics on 32-bit ARM with
NEON.

Fixes rust-lang-nursery/simd#10.

7 years agoAuto merge of #42480 - eddyb:issue-42463, r=nikomatsakis
bors [Wed, 7 Jun 2017 07:52:12 +0000 (07:52 +0000)]
Auto merge of #42480 - eddyb:issue-42463, r=nikomatsakis

rustc_typeck: do not overlap a borrow of TypeckTables with method lookup.

If trait selection is reached, it could potentially request a closure signature, which will have to borrow the `TypeckTables` of the current function, and so those tables *should not* be mutably borrowed.

Fixes #42463.
r? @nikomatsakis

7 years agoAuto merge of #42494 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 7 Jun 2017 04:24:15 +0000 (04:24 +0000)]
Auto merge of #42494 - frewsxcv:rollup, r=frewsxcv

Rollup of 7 pull requests

- Successful merges: #42409, #42415, #42429, #42438, #42466, #42469, #42485
- Failed merges:

7 years agoReplace some matches with try.
Masaki Hara [Sun, 4 Jun 2017 05:10:14 +0000 (14:10 +0900)]
Replace some matches with try.

7 years agoAlias std::cmp::max/min to Ord::max/min
Nick Whitney [Wed, 7 Jun 2017 03:00:09 +0000 (23:00 -0400)]
Alias std::cmp::max/min to Ord::max/min

7 years agoAdd max and min default fns to Ord trait
Nick Whitney [Tue, 6 Jun 2017 05:31:46 +0000 (01:31 -0400)]
Add max and min default fns to Ord trait

Pursuant to issue #25663, this commit adds the max and min functions to the Ord trait, enabling items that implement Ord to use UFCS (ex. 1.max(2)) instead of the longer std::cmp::max(1,2) format.

7 years agoRollup merge of #42485 - Mark-Simulacrum:skip-no-doc, r=alexcrichton
Corey Farwell [Wed, 7 Jun 2017 02:36:37 +0000 (22:36 -0400)]
Rollup merge of #42485 - Mark-Simulacrum:skip-no-doc, r=alexcrichton

Skip printing for skipped doc tests.

Followup to https://github.com/rust-lang/rust/pull/42437 to further reduce noise.

r? @alexcrichton

7 years agoRollup merge of #42469 - citizen428:document-assert-macros, r=steveklabnik
Corey Farwell [Wed, 7 Jun 2017 02:36:36 +0000 (22:36 -0400)]
Rollup merge of #42469 - citizen428:document-assert-macros, r=steveklabnik

Doc changes for assert macros

See #29381

7 years agoRollup merge of #42466 - wesleywiser:fix_42407, r=arielb1
Corey Farwell [Wed, 7 Jun 2017 02:36:35 +0000 (22:36 -0400)]
Rollup merge of #42466 - wesleywiser:fix_42407, r=arielb1

syntax_pos::Symbol should not implement Sync

Fixes #42407

7 years agoRollup merge of #42438 - king6cong:master, r=alexcrichton
Corey Farwell [Wed, 7 Jun 2017 02:36:34 +0000 (22:36 -0400)]
Rollup merge of #42438 - king6cong:master, r=alexcrichton

doc rewording

7 years agoRollup merge of #42429 - venkatagiri:llvm_config, r=alexcrichton
Corey Farwell [Wed, 7 Jun 2017 02:36:34 +0000 (22:36 -0400)]
Rollup merge of #42429 - venkatagiri:llvm_config, r=alexcrichton

rustc_llvm: re-run build script if config.toml changes

closes #35199

7 years agoRollup merge of #42415 - stephen-lazaro:Issue29094, r=arielb1
Corey Farwell [Wed, 7 Jun 2017 02:36:33 +0000 (22:36 -0400)]
Rollup merge of #42415 - stephen-lazaro:Issue29094, r=arielb1

Remove 'elided' from lifetime resolution error

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

This PR resolves https://github.com/rust-lang/rust/issues/29094

r? @Mark-Simulacrum

7 years agoRollup merge of #42409 - bjorn3:patch-3, r=frewsxcv
Corey Farwell [Wed, 7 Jun 2017 02:36:32 +0000 (22:36 -0400)]
Rollup merge of #42409 - bjorn3:patch-3, r=frewsxcv

Better docs

Working on more doc improvements

Edit: done for today

7 years agoAuto merge of #42133 - cuviper:stdio-from, r=alexcrichton
bors [Wed, 7 Jun 2017 02:11:20 +0000 (02:11 +0000)]
Auto merge of #42133 - cuviper:stdio-from, r=alexcrichton

Add conversions from File and Child* handles to Stdio

`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`,
`From<ChildStderr>`, and `From<File>`.

The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into<Stdio>`.

This makes it much easier to write shell-like command chains, piping to
one another and redirecting to and from files.  Otherwise one would need
to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.

7 years agoAdd conversions from File and Child* handles to Stdio
Josh Stone [Tue, 6 Jun 2017 22:42:55 +0000 (15:42 -0700)]
Add conversions from File and Child* handles to Stdio

`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`,
`From<ChildStderr>`, and `From<File>`.

The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into<Stdio>`.

This makes it much easier to write shell-like command chains, piping to
one another and redirecting to and from files.  Otherwise one would need
to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.

7 years agoFix setting PATH during linkage on windows-gnu
Brian Anderson [Tue, 6 Jun 2017 02:07:43 +0000 (19:07 -0700)]
Fix setting PATH during linkage on windows-gnu

7 years agobootstrap: improve 'build --help' by explaining what exactly the last example does
Ralf Jung [Tue, 6 Jun 2017 21:26:56 +0000 (14:26 -0700)]
bootstrap: improve 'build --help' by explaining what exactly the last example does

7 years agoAuto merge of #42361 - GuillaumeGomez:error-codes, r=arielb1
bors [Tue, 6 Jun 2017 20:46:10 +0000 (20:46 +0000)]
Auto merge of #42361 - GuillaumeGomez:error-codes, r=arielb1

Add E0602

Part of #42229.

cc @Susurrus

7 years agoChanging error message for interior mutability, adding ui test
gaurikholkar [Thu, 1 Jun 2017 10:16:26 +0000 (15:46 +0530)]
Changing error message for interior mutability, adding ui test

7 years agoStatements do not have types.
Eduard-Mihai Burtescu [Tue, 6 Jun 2017 19:43:59 +0000 (22:43 +0300)]
Statements do not have types.

7 years agorustc_typeck: do not overlap a borrow of TypeckTables with method lookup.
Eduard-Mihai Burtescu [Tue, 6 Jun 2017 15:50:21 +0000 (18:50 +0300)]
rustc_typeck: do not overlap a borrow of TypeckTables with method lookup.

7 years agorustc_trans: do not store pair fields if they are ZSTs.
Eduard-Mihai Burtescu [Tue, 6 Jun 2017 18:13:13 +0000 (21:13 +0300)]
rustc_trans: do not store pair fields if they are ZSTs.

7 years agoSkip printing for skipped doc tests.
Mark Simulacrum [Tue, 6 Jun 2017 18:00:22 +0000 (12:00 -0600)]
Skip printing for skipped doc tests.

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 agoAdd overflow checking for str::get with inclusive ranges
Scott McMurray [Sun, 4 Jun 2017 18:08:25 +0000 (11:08 -0700)]
Add overflow checking for str::get with inclusive ranges

Fixes #42401

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 agoDelegate str:Index(Mut) to SliceIndex<str>
Scott McMurray [Sun, 4 Jun 2017 08:47:21 +0000 (01:47 -0700)]
Delegate str:Index(Mut) to SliceIndex<str>

Move any extra logic that the former had into the latter, so they're consistent.

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