Commit Graph

73779 Commits

Author SHA1 Message Date
Gilad Naaman
8b3fd98f4c libtest: rustfmt run
libtest: Whoops
2018-01-26 19:46:04 +02:00
Gilad Naaman
94bd1216bb libtest: Fixed pretty-printing of test names in single-threaded code. 2018-01-26 19:46:04 +02:00
Gilad Naaman
e570e9e79a libtest: JSON formatting is now only available in unstable builds
libtest: Added the -Z option for unstable options
2018-01-26 19:46:04 +02:00
Gilad Naaman
588a6a35be Added JSON output to libtest.
libtest: Json format now outputs failed tests' stdouts.

libtest: Json format now outputs failed tests' stdouts.

libtest: Json formatter now spews individiual events, not as an array

libtest: JSON fixes

libtest: Better JSON escaping

libtest: Test start event is printed on time
2018-01-26 19:46:04 +02:00
Gilad Naaman
d24f9af31c Refactoring needed in order to have test json output. 2018-01-26 19:46:04 +02:00
bors
a97cd17f5d Auto merge of #47252 - Zoxc:backtrace-win, r=alexcrichton
Print inlined functions on Windows

Split from https://github.com/rust-lang/rust/pull/45637

r? @alexcrichton
2018-01-26 12:18:00 +00:00
bors
5669050303 Auto merge of #47676 - topecongiro:update-rls, r=alexcrichton
Update rls

Currently rls is missing from the latest nightly component. This PR brings it back.
2018-01-26 04:10:10 +00:00
topecongiro
8636d0142b Update rls 2018-01-26 12:58:02 +09:00
John Kåre Alsaker
634f8cc06a Print inlined functions on Windows 2018-01-26 04:49:54 +01:00
bors
9fd7da904b Auto merge of #47740 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 10 pull requests

- Successful merges: #47534, #47609, #47679, #47691, #47700, #47702, #47717, #47721, #47726, #47729
- Failed merges:
2018-01-25 15:27:18 +00:00
Guillaume Gomez
89ff1226e5 Rollup merge of #47729 - alexcrichton:update-cargo, r=sfackler
Update Cargo submodule to master

Just a routine update
2018-01-25 15:52:19 +01:00
Guillaume Gomez
58e56cca56 Rollup merge of #47726 - pietroalbini:fix-nested-empty-groups-span, r=petrochenkov
Fix spans in unused import lint for nested groups

This fixes an inconsistency for empty nested groups, and adds a test for all the possible cases of the lint.

```
warning: unused imports: `*`, `Foo`, `baz::{}`, `foobar::*`
  --> test.rs:16:11
   |
16 | use foo::{Foo, bar::{baz::{}, foobar::*}, *};
   |           ^^^        ^^^^^^^  ^^^^^^^^^   ^
   |
   = note: #[warn(unused_imports)] on by default

warning: unused import: `*`
  --> test.rs:17:24
   |
17 | use foo::bar::baz::{*, *};
   |                        ^

warning: unused import: `use foo::{};`
  --> test.rs:18:1
   |
18 | use foo::{};
   | ^^^^^^^^^^^^
```

cc #44494
2018-01-25 15:52:18 +01:00
Guillaume Gomez
6f2a0c6f68 Rollup merge of #47721 - GuillaumeGomez:experimental-color, r=QuietMisdreavus
Fix experimental text display on default theme

r? @QuietMisdreavus
2018-01-25 15:52:17 +01:00
Guillaume Gomez
f769b9de02 Rollup merge of #47717 - evelynmitchell:47716-doc-fix, r=steveklabnik
fix for documentation error issue 47716

Fix #47716
2018-01-25 15:52:16 +01:00
Guillaume Gomez
a809da3fee Rollup merge of #47702 - etaoins:fix-into-cast-paren-precedence, r=petrochenkov
Fix into() cast paren check precedence

As discussed in #47699 the logic for determining if an expression needs parenthesis when suggesting an `.into()` cast is incorrect. Two broken examples from nightly are:

```
error[E0308]: mismatched types
 --> main.rs:4:10
  |
4 |     test(foo as i8);
  |          ^^^^^^^^^ expected i32, found i8
help: you can cast an `i8` to `i32`, which will sign-extend the source value
  |
4 |     test(foo as i8.into());
  |
```

```
error[E0308]: mismatched types
 --> main.rs:4:10
  |
4 |     test(*foo);
  |          ^^^^ expected i32, found i8
help: you can cast an `i8` to `i32`, which will sign-extend the source value
  |
4 |     test(*foo.into());
  |
```

As suggested by @petrochenkov switch the precedence check to `PREC_POSTFIX`. This catches both `as` and unary operators. Fixes #47699.

r? @petrochenkov
2018-01-25 15:52:15 +01:00
Guillaume Gomez
3a863a3f45 Rollup merge of #47700 - EdSchouten:cc104, r=kennytm
Remove workarounds for cc 1.0.3.

Now that the Rust codebase depends on cc 1.0.4, there is no longer any
need to specify a compiler for CloudABI manually. Cargo will
automatically call into the right compiler executable.
2018-01-25 15:52:15 +01:00
Guillaume Gomez
df55cee0e5 Rollup merge of #47691 - estebank:unknown-lang-item-sp, r=rkruppe
Point at unknown lang item attribute
2018-01-25 15:52:14 +01:00
Guillaume Gomez
bbdc5b9637 Rollup merge of #47679 - etaoins:remove-redundant-backtrace-hint, r=estebank
Remove broken redundant backtrace hint

When the compiler driver panics it attempts to show a hint about using `RUST_BACKTRACE`. However, the logic is currently reversed to the hint is only shown if `RUST_BACKTRACE` is **already**   set:

```shell
> RUST_BACKTRACE=1 rustc /dev/null --crate-type proc-macro
error: internal compiler error: unexpected panic
...
note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

> RUST_BACKTRACE=0 rustc /dev/null --crate-type proc-macro
error: internal compiler error: unexpected panic
...
thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

As the `panic` itself already has a working `RUST_BACKTRACE` hint just remove the broken duplicate hint entirely.
2018-01-25 15:52:13 +01:00
Guillaume Gomez
83603b8294 Rollup merge of #47609 - ritiek:test-mutating-references, r=nikomatsakis
NLL test for mutating &mut references

As mentioned in #46361.

cc @nikomatsakis?
2018-01-25 15:52:12 +01:00
Guillaume Gomez
e26aac5a9f Rollup merge of #47534 - estebank:suggest-public-traits, r=petrochenkov
On missing method do not suggest private traits

When encountering a method call for an ADT that doesn't have any
implementation of it, we search for traits that could be implemented
that do have that method. Filter out private non-local traits that would
not be able to be implemented.

This doesn't account for public traits that are in a private scope, but
works as a first approximation and is a more correct behavior than the
current one.

Fix #45781.
2018-01-25 15:52:11 +01:00
bors
4cf26f8a13 Auto merge of #47686 - GuillaumeGomez:theme-fixes, r=QuietMisdreavus
Few fixes for multiple themes support feature

r? @QuietMisdreavus

Fixes #47695.
2018-01-25 06:12:06 +00:00
Alex Crichton
15899b0c12 Update Cargo submodule to master
Just a routine update
2018-01-24 20:02:16 -08:00
bors
247835aacb Auto merge of #47374 - topecongiro:issue-47096, r=nikomatsakis
Simplify irrefutable slice patterns

Closes #47096.
2018-01-25 03:20:54 +00:00
bors
a0a9007f8d Auto merge of #47006 - bitshifter:stabilize-repr-align, r=eddyb
Stabilized `#[repr(align(x))]` attribute (RFC 1358)

Stabilzed `#[repr(align(x))]` with attr_literal syntax as proposed by @eddyb https://github.com/rust-lang/rust/issues/33626#issuecomment-348467804
2018-01-25 00:26:17 +00:00
Pietro Albini
0847ac0265
Fix wrong span for nested empty groups 2018-01-24 23:46:02 +01:00
Guillaume Gomez
e1e991d3d2 Fix experimental text display on default theme 2018-01-24 19:15:41 +01:00
evelynmitchell
05652d2ae3
fix for documentation error issue 47716 2018-01-24 09:25:46 -07:00
Guillaume Gomez
e78f1392b7 Few fixes for multiple themes support feature 2018-01-24 12:13:52 +01:00
bors
a0dcecff90 Auto merge of #47300 - remexre:duration-constructors-as-const-fns, r=alexcrichton
Makes the constructors of Duration const fns.

This affects `Duration::new`, `Duration::from_secs`, `Duration::from_millis`, `Duration::from_micros`, and `Duration::from_nanos`.
2018-01-24 10:39:25 +00:00
Ryan Cumming
65b1e86aed Fix into() cast paren check precedence
As discussed in #47699 the logic for determining if an expression needs
parenthesis when suggesting an `.into()` cast is incorrect. Two broken
examples from nightly are:

```
error[E0308]: mismatched types
 --> main.rs:4:10
  |
4 |     test(foo as i8);
  |          ^^^^^^^^^ expected i32, found i8
help: you can cast an `i8` to `i32`, which will sign-extend the source value
  |
4 |     test(foo as i8.into());
  |
```

```
error[E0308]: mismatched types
 --> main.rs:4:10
  |
4 |     test(*foo);
  |          ^^^^ expected i32, found i8
help: you can cast an `i8` to `i32`, which will sign-extend the source value
  |
4 |     test(*foo.into());
  |
```

As suggested by @petrochenkov switch the precedence check to
PREC_POSTFIX. This catches both `as` and unary operators. Fixes #47699.
2018-01-24 20:31:36 +11:00
Ed Schouten
583b382deb Remove workarounds for cc 1.0.3.
Now that the Rust codebase depends on cc 1.0.4, there is no longer any
need to specify a compiler for CloudABI manually. Cargo will
automatically call into the right compiler executable.
2018-01-24 08:30:17 +01:00
bors
9758ff9c0b Auto merge of #47299 - cramertj:unsafe-placer, r=alexcrichton
Make core::ops::Place an unsafe trait

Consumers of `Place` would reasonably expect that the `pointer` function returns a valid pointer to memory that can actually be written to.
2018-01-24 07:22:22 +00:00
Esteban Küber
e6af9ebea2 Point at unknown lang item attribute 2018-01-23 21:36:40 -08:00
bors
a538fe7ce7 Auto merge of #46931 - clarcharr:float_bits_core, r=alexcrichton
Expose float from_bits and to_bits in libcore.

These methods have no dependencies on libm and thus should be offered in libcore.
2018-01-24 03:02:15 +00:00
bors
fdecb0564b Auto merge of #45337 - Zoxc:gen-static, r=nikomatsakis
Immovable generators

This adds support for immovable generators which allow you to borrow local values inside generator across suspension points. These are declared using a `static` keyword:
```rust
let mut generator = static || {
    let local = &Vec::new();
    yield;
    local.push(0i8);
};
generator.resume();

// ERROR moving the generator after it has resumed would invalidate the interior reference
// drop(generator);
```

Region inference is no longer affected by the types stored in generators so the regions inside should be similar to other code (and unaffected by the presence of `yield` expressions). The borrow checker is extended to pick up the slack so interior references still result in errors for movable generators. This fixes #44197, #45259 and #45093.

This PR depends on [PR #44917 (immovable types)](https://github.com/rust-lang/rust/pull/44917), I suggest potential reviewers ignore the first commit as it adds immovable types.
2018-01-23 22:50:03 +00:00
ritiek
06d123d4be Remove similar test that does not run the result 2018-01-23 22:45:10 +05:30
bors
4e3901d35f Auto merge of #47678 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

- Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672
- Failed merges:
2018-01-23 16:13:18 +00:00
kennytm
9707b31076
Rollup merge of #47672 - ollie27:rustdoc_auto_traits, r=GuillaumeGomez
rustdoc: Show when traits are auto traits
2018-01-23 22:31:02 +08:00
kennytm
97358644a0
Rollup merge of #47667 - GuillaumeGomez:fix-quoted-search, r=QuietMisdreavus
Fix quoted search

r? @QuietMisdreavus
2018-01-23 22:31:01 +08:00
kennytm
4cc2f96837
Rollup merge of #47662 - spastorino:add_test_to_nll, r=nikomatsakis
Add dynamic-drop test to nll tests also

r? @nikomatsakis

Fixes #47585
2018-01-23 22:31:00 +08:00
kennytm
6dcaa0af20
Rollup merge of #47661 - bjorn3:refactor_driver, r=michaelwoerister
Inline some rustc_driver function
2018-01-23 22:30:59 +08:00
kennytm
117eb68122
Rollup merge of #47655 - etaoins:fix-spurious-warning-on-empty-proc-macro-crate, r=alexcrichton
Fix spurious warning on empty proc macro crates

While attempting to reproduce rust-lang/rust#47086 I noticed the following warning:

```shell
> rustc /dev/null --crate-type proc-macro
warning: unused variable: `registrar`
 --> /dev/null:0:1
```

As there are no macros to register the automatically generated registrar function for the crate has no body. As a result its `registrar` argument is unused triggering the above warning.

The warning is confusing and not easily actionable by the developer. It could also be triggered legitimately by e.g. having all of the macros in a crate #[cfg]'ed out.

Fix by naming the generated argument `_registrar` inside `mk_registrar()`. This suppresses the unused variable warning.
2018-01-23 22:30:58 +08:00
kennytm
9d26a25bb6
Rollup merge of #47635 - Zoxc:remove-attr, r=michaelwoerister
Remove the IGNORED_ATTR_NAMES thread local
2018-01-23 22:30:57 +08:00
bors
3a39b2aa5a Auto merge of #47620 - GuillaumeGomez:multiple-themes, r=QuietMisdreavus
Multiple themes for rustdoc

r? @QuietMisdreavus
2018-01-23 13:23:58 +00:00
Ryan Cumming
5de8e040d2 Remove broken redundant backtrace hint
When the compiler driver panics it attempts to show a hint about using
`RUST_BACKTRACE`. However, the logic is currently reversed to the hint
is only shown if `RUST_BACKTRACE` is *already* set:

```shell
> RUST_BACKTRACE=1 rustc /dev/null --crate-type proc-macro
error: internal compiler error: unexpected panic
...
note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

> RUST_BACKTRACE=0 rustc /dev/null --crate-type proc-macro
error: internal compiler error: unexpected panic
...
thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

As the `panic` itself already has a working `RUST_BACKTRACE` hint just
remove the broken duplicate hint entirely.
2018-01-23 20:25:48 +11:00
kennytm
cb0a8bf7d1 Rollup merge of #47610 - cuviper:captured-dwarf, r=eddyb
LLVM5: Update DW_OP_plus to DW_OP_plus_uconst

LLVM <= 4.0 used a non-standard interpretation of `DW_OP_plus`.  In the
DWARF standard, this adds two items on the expressions stack.  LLVM's
behavior was more like DWARF's `DW_OP_plus_uconst` -- adding a constant
that follows the op.  The patch series starting with [D33892] switched
to the standard DWARF interpretation, so we need to follow.

[D33892]: https://reviews.llvm.org/D33892

Fixes #47464
r? @eddyb
2018-01-23 17:03:40 +08:00
kennytm
52f8d2dc35 Rollup merge of #47558 - spastorino:rustc_args, r=nikomatsakis
Add rustc-args option to test runner

r? @nikomatsakis
2018-01-23 17:03:39 +08:00
kennytm
60b987d0a9 Rollup merge of #47554 - EdSchouten:cloudabi-jemalloc, r=nikomatsakis
Make liballoc_jemalloc work on CloudABI.

The automated builds for CloudABI in dist-various-2 don't use
--disable-jemalloc, even though my original container image did. Instead
of setting that flag, let's go the extra mile of making jemalloc work.
CloudABI's C library already uses jemalloc and now exposes the API
extensions used by us.

This makes the CloudABI dist work out of the box.
2018-01-23 17:03:38 +08:00
kennytm
658ccae684 Rollup merge of #47549 - Manishearth:29723-regression, r=nikomatsakis
Add regression test for #29723

cc #29723

r? @nikomatsakis
2018-01-23 17:03:37 +08:00
kennytm
82981a77c4 Rollup merge of #47541 - psumbera:master, r=eddyb
Fixes sparc64 cabi fixes.

Argument up to 16 bytes size is provided in registers.
Return value up to 32 bytes size is stored in registers.

Fixes: #46679

---

Firefox now (almost) build on sparc. Original rust issue seems to be gone. Note that I'm not rust expert and the fix was suggested in bug.
2018-01-23 17:03:36 +08:00