Commit Graph

77061 Commits

Author SHA1 Message Date
Oliver Schneider
0f1f9a79f2
Update clippy 2018-04-19 08:52:52 +02:00
bors
883bf4ba2e Auto merge of #49630 - npmccallum:shl, r=alexcrichton
Update Rhs on ShlAssign to default to Self

This matches the behavior on ShrAssign and all other *Assign operations.
2018-04-19 03:53:32 +00:00
bors
5dc896e9e7 Auto merge of #50048 - glandium:issue50041, r=eddyb
rustc_trans: also check dominators for SSA values in mir::analyze

Fixes #50041
2018-04-19 01:13:29 +00:00
bors
e0f9b32357 Auto merge of #50022 - nrc:doc-analysis, r=mark-simulacrum
Only emit save-analysis data for `cargo build` tasks

Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.

cc https://github.com/rust-lang-nursery/rls/issues/826

r? @Mark-Simulacrum
2018-04-18 22:30:00 +00:00
bors
ac3c2288f9 Auto merge of #50017 - tinaun:stabilize-all-the-things, r=sfackler
stabilize a bunch of minor api additions

besides `ptr::NonNull::cast` (which is 4 days away from end of FCP) all of these have been finished with FCP for a few weeks now with minimal issues raised

* Closes #41020
* Closes #42818
* Closes #44030
* Closes #44400
* Closes #46507
* Closes #47653
* Closes #46344

the following functions will be stabilized in 1.27:
* `[T]::rsplit`
* `[T]::rsplit_mut`
* `[T]::swap_with_slice`
* `ptr::swap_nonoverlapping`
* `NonNull::cast`
* `Duration::from_micros`
* `Duration::from_nanos`
* `Duration::subsec_millis`
* `Duration::subsec_micros`
* `HashMap::remove_entry`
2018-04-18 19:47:56 +00:00
bors
c8fa49f83b Auto merge of #50006 - rcoh:reorder-compiler-builtins, r=oli-obk
Reorder injection of std to get better compilation error

Per #49851, reorder injection imports to get a better error message.

r? @oli-obk
2018-04-18 17:07:21 +00:00
bors
3dfda16525 Auto merge of #49993 - nnethercote:shrink-Token, r=alexcrichton
Change the hashcounts in raw `Lit` variants from usize to u16.

This reduces the size of `Token` from 32 bytes to 24 bytes on 64-bit
platforms.
2018-04-18 14:44:54 +00:00
bors
65d201f7d6 Auto merge of #49981 - nox:fix-signed-niches, r=eddyb
Properly handle ranges of signed enums using both extremums (fixes #49973)

Fixes #49973.
2018-04-18 12:22:11 +00:00
Eduard-Mihai Burtescu
45fd7416a4 rustc_trans: also check dominators for SSA values in mir::analyze.
Fixes #50041
2018-04-18 20:02:23 +09:00
bors
f4bb956278 Auto merge of #49349 - Zoxc:sync-errors, r=michaelwoerister
Make Handler more thread-safe

The use of `code_emitted` to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outside `diagnostics.rs` anyway. It would be better to add a `teach` method to `DiagnosticsBuilder`, so instead of:
```
if self.tcx.sess.teach(&err.get_code().unwrap()) {
    err.note("...");
}
```
we'd use `err.teach("...")`

cc @estebank

r? @michaelwoerister
2018-04-18 08:29:14 +00:00
bors
23561c6747 Auto merge of #49972 - Mark-Simulacrum:remove-build, r=alexcrichton
Remove uses of Build across Builder steps

This is purely a code cleanup; there should be no functional changes.

r? @alexcrichton
2018-04-18 05:54:21 +00:00
bors
dcb44ca2f7 Auto merge of #49969 - mark-i-m:allocator_fmt, r=estebank
Various rustfmt and commenting changes

These are factored out of #49320

There aren't actually any changes in functionality, just rustfmt and doccomments.
2018-04-18 03:35:55 +00:00
Mark Simulacrum
be1e7893d5 Remove uses of Build across Builder steps 2018-04-17 19:50:50 -06:00
bors
b91e6a2672 Auto merge of #49950 - Zoxc:default-span, r=estebank
Improve query cycle error message

r? @michaelwoerister
2018-04-18 01:04:04 +00:00
bors
9a59133c09 Auto merge of #50036 - nrc:update, r=alexcrichton
Update Rustfmt

Fixes RLS and Rustfmt and enables a new nightly

r? @alexcrichton
2018-04-17 21:56:50 +00:00
Nick Cameron
70539d084e Update Rustfmt 2018-04-18 08:21:19 +12:00
bors
786e3058d2 Auto merge of #49904 - michaelwoerister:no-debug-attr, r=alexcrichton
Work around LLVM debuginfo problem in librustc_driver.

Works around a problem (https://github.com/rust-lang/rust/issues/48910) with global variable debuginfo generation for `rustc_driver::get_trans::LOAD` by applying `#[no_debug]` to it (which just disables debuginfo generation for that variable). This way we can build the compiler with debuginfo again.

Since the problem is also present in beta, this workaround might have to be backported.

r? @alexcrichton
2018-04-17 19:26:25 +00:00
bors
9379bcdd0b Auto merge of #50033 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #49699 (Removed 'proc' from the reserved keywords list)
 - #49966 (Multiple query search)
 - #50013 (Remove no longer necessary comparison to Vec::splice.)
 - #50032 (rustdoc: Don't include private paths in all.html)

Failed merges:
2018-04-17 16:51:55 +00:00
Guillaume Gomez
92d29c1267
Rollup merge of #50032 - ollie27:rustdoc_all_private, r=GuillaumeGomez
rustdoc: Don't include private paths in all.html

For example the `std` [`all.html`](https://doc.rust-lang.org/nightly/std/all.html) includes references to the `coresimd` module which is a private implementation detail.

r? @GuillaumeGomez
2018-04-17 18:43:17 +02:00
Guillaume Gomez
6f5fc47ccc
Rollup merge of #50013 - frewsxcv:frewsxcv-ssplice, r=GuillaumeGomez
Remove no longer necessary comparison to Vec::splice.

`String::replace_range` was previously called `String::splice`, so this
note was necessary to differentiate it from the `Vec` method. Now that
it's renamed, this note no longer seems necessary.
2018-04-17 18:43:16 +02:00
Guillaume Gomez
7a6fad32af
Rollup merge of #49966 - GuillaumeGomez:comma-search, r=QuietMisdreavus
Multiple query search

Part of #49757.

r? @QuietMisdreavus
2018-04-17 18:43:15 +02:00
Guillaume Gomez
7a39e90afc
Rollup merge of #49699 - zesterer:master, r=joshtriplett
Removed 'proc' from the reserved keywords list

Remove 'proc' from the reserved keywords list.

'proc' is a very useful identifier name for a lot of things. It's especially useful when dealing with processes, operating system internals, and kernel development.
2018-04-17 18:43:13 +02:00
Mark Mansi
787b70592f Turn some comments into doccomments 2018-04-17 10:54:10 -05:00
Mark Mansi
5977818678 run rustfmt on rustc_driver/driver.rs 2018-04-17 10:54:10 -05:00
Mark Mansi
3d6d9f98d1 Run rustfmt 2018-04-17 10:52:33 -05:00
John Kåre Alsaker
e5fc06da8a Make one_time_diagnostics thread-safe 2018-04-17 16:43:30 +02:00
John Kåre Alsaker
bf06a53265 Make Handler more thread-safe 2018-04-17 16:43:30 +02:00
bors
881a7cd86e Auto merge of #49836 - nikomatsakis:nll-facts-prep, r=pnkfelix
prep work for using timely dataflow with NLL

Two major changes:

**Two-phase borrows are overhauled.** We no longer have two bits per borrow. Instead, we track -- for each borrow -- an (optional) "activation point". Then, for each point P where the borrow is in scope, we check where P falls relative to the activation point. If P is between the reservation point and the activation point, then this is the "reservation" phase of the borrow, else the borrow is considered active. This is simpler and means that the dataflow doesn't have to care about 2-phase at all, at last not yet.

**We no longer support using the MIR borrow checker without NLL.** It is going to be increasingly untenable to support lexical mode as we go forward, I think, and also of increasingly little value. This also exposed a few bugs in NLL mode due to increased testing.

r? @pnkfelix
cc @bobtwinkles
2018-04-17 14:23:57 +00:00
Michael Woerister
281492898b Clean up attribute handling in create_function_debug_context(). 2018-04-17 16:23:48 +02:00
Michael Woerister
6f9c36e400 Use #[no_debug] to work around LLVM problem with rustc_driver::get_trans::LOAD. 2018-04-17 15:49:54 +02:00
Michael Woerister
5cc7d5ef70 Support #[no_debug] for global variables. 2018-04-17 15:01:31 +02:00
Michael Woerister
d5b48a4b1b Add #[no_debug] to trans_fn_attrs() query. 2018-04-17 15:01:31 +02:00
bors
d703622ce0 Auto merge of #49626 - fanzier:chalk-lowering, r=scalexm
Implement Chalk lowering rule Normalize-From-Impl

This extends the Chalk lowering pass with the "Normalize-From-Impl" rule for generating program clauses from a trait definition as part of #49177.

r? @nikomatsakis
2018-04-17 11:31:19 +00:00
Nick Cameron
de34735ab2 Only emit save-analysis data for cargo build tasks
Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.

cc https://github.com/rust-lang-nursery/rls/issues/826
2018-04-17 21:35:10 +12:00
bors
8728c7a726 Auto merge of #49542 - GuillaumeGomez:intra-link-resolution-error, r=GuillaumeGomez
Add warning if a resolution failed

r? @QuietMisdreavus
2018-04-17 09:02:03 +00:00
bors
6b12d361ff Auto merge of #49882 - Zoxc:sync-misc2, r=michaelwoerister
More thread-safety changes

r? @michaelwoerister
2018-04-17 06:46:31 +00:00
tinaun
fd042eee00 stabilize hash_map_remove_entry feature 2018-04-17 01:22:28 -04:00
tinaun
b84baf2378 stabilize nonnull_cast feature 2018-04-17 01:22:28 -04:00
tinaun
4a8f4b7e49 stabilize duration_extras feature 2018-04-17 01:22:21 -04:00
tinaun
335195d628 stabilize duration_from_micros feature 2018-04-17 00:49:45 -04:00
tinaun
78a8c25703 stabilize swap_with_slice feature 2018-04-17 00:49:24 -04:00
tinaun
41c211d204 stabilize swap_nonoverlapping feature 2018-04-17 00:48:38 -04:00
tinaun
edc412c5a9 stabilize slice_rsplit feature 2018-04-17 00:48:23 -04:00
bors
186db76159 Auto merge of #49664 - alexcrichton:stable-simd, r=BurntSushi
Stabilize x86/x86_64 SIMD

This commit stabilizes the SIMD in Rust for the x86/x86_64 platforms. Notably
this commit is stabilizing:

* The `std::arch::{x86, x86_64}` modules and the intrinsics contained inside.
* The `is_x86_feature_detected!` macro in the standard library
* The `#[target_feature(enable = "...")]` attribute
* The `#[cfg(target_feature = "...")]` matcher

Stabilization of the module and intrinsics were primarily done in
rust-lang-nursery/stdsimd#414 and the two attribute stabilizations are done in
this commit. The standard library is also tweaked a bit with the new way that
stdsimd is integrated.

Note that other architectures like `std::arch::arm` are not stabilized as part
of this commit, they will likely stabilize in the future after they've been
implemented and fleshed out. Similarly the `std::simd` module is also not being
stabilized in this commit, only `std::arch`. Finally, nothing related to `__m64`
is stabilized in this commit either (MMX), only SSE and up types and intrinsics
are stabilized.

Closes #29717
Closes #44839
Closes #48556
2018-04-17 03:57:22 +00:00
bors
94516c5038 Auto merge of #50012 - Zoxc:msvc-fix, r=Mark-Simulacrum
Don't look for cc/cxx when testing with bogus targets

This fixes test builds on Windows.

r? @Mark-Simulacrum
2018-04-17 01:41:43 +00:00
Corey Farwell
01e8bebaf1 Remove no longer necessary comparison to Vec::splice.
`String::replace_range` was previously called `String::splice`, so this
note was necessary to differentiate it from the `Vec` method. Now that
it's renamed, this note no longer seems necessary.
2018-04-17 10:23:06 +09:00
John Kåre Alsaker
52e1c84732 Don't look for cc/cxx when testing with bogus targets 2018-04-17 01:59:00 +02:00
bors
3809bbf47c Auto merge of #49488 - alexcrichton:small-wasm-panic, r=sfackler
std: Minimize size of panicking on wasm

This commit applies a few code size optimizations for the wasm target to
the standard library, namely around panics. We notably know that in most
configurations it's impossible for us to print anything in
wasm32-unknown-unknown so we can skip larger portions of panicking that
are otherwise simply informative. This allows us to get quite a nice
size reduction.

Finally we can also tweak where the allocation happens for the
`Box<Any>` that we panic with. By only allocating once unwinding starts
we can reduce the size of a panicking wasm module from 44k to 350 bytes.
2018-04-16 23:19:41 +00:00
Guillaume Gomez
05275dafaa Remove unwanted auto-linking and update 2018-04-16 23:37:11 +02:00
Guillaume Gomez
a3ed2abed7 Fix empty tests 2018-04-16 23:37:11 +02:00