]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoAuto merge of #51833 - wesleywiser:faster_large_constant_arrays, r=oli-obk
bors [Sun, 1 Jul 2018 18:43:41 +0000 (18:43 +0000)]
Auto merge of #51833 - wesleywiser:faster_large_constant_arrays, r=oli-obk

Speed up compilation of large constant arrays

This is a different approach to #51672 as suggested by @oli-obk. Rather
than write each repeated value one-by-one, we write the first one and
then copy its value directly into the remaining memory.

With this change, the [toy program](https://github.com/rust-lang/rust/blob/c2f4744d2db4e162df824d0bd0b093ba4b351545/src/test/run-pass/mir_heavy_promoted.rs) goes from 63 seconds to 19 seconds on my machine.

Edit: Inlining `Size::bytes()` saves an additional 6 seconds dropping the total time to 13 seconds on my machine.

Edit2: Now down to 2.8 seconds.

r? @oli-obk

cc @nnethercote @eddyb

6 years agoAuto merge of #51536 - davidtwco:nll-dyn-trait-underscore-error-improvements, r=nikom...
bors [Sun, 1 Jul 2018 15:49:48 +0000 (15:49 +0000)]
Auto merge of #51536 - davidtwco:nll-dyn-trait-underscore-error-improvements, r=nikomatsakis

NLL: bad error message when converting anonymous lifetime to `'static`

Contributes to #46983. This PR doesn't introduce fantastic errors, but it should hopefully lay some groundwork for diagnostic improvements.
r? @nikomatsakis

6 years agoUpdated affected tests after rebase.
David Wood [Fri, 29 Jun 2018 23:10:00 +0000 (00:10 +0100)]
Updated affected tests after rebase.

6 years agoFix infinite loops when regions are self-referential.
David Wood [Fri, 29 Jun 2018 21:17:35 +0000 (22:17 +0100)]
Fix infinite loops when regions are self-referential.

6 years agoWIP boring() long line
Niko Matsakis [Thu, 28 Jun 2018 19:00:00 +0000 (15:00 -0400)]
WIP boring() long line

6 years agoEnsure that changed errors are lower case.
David Wood [Wed, 27 Jun 2018 20:18:07 +0000 (21:18 +0100)]
Ensure that changed errors are lower case.

6 years agoUpdated affected tests.
David Wood [Tue, 26 Jun 2018 22:30:52 +0000 (23:30 +0100)]
Updated affected tests.

6 years agoIntroduce new categories and show a reasonable error message.
David Wood [Tue, 26 Jun 2018 22:00:24 +0000 (23:00 +0100)]
Introduce new categories and show a reasonable error message.

6 years agoMoved region inference error reporting into own module.
David Wood [Wed, 20 Jun 2018 20:34:34 +0000 (21:34 +0100)]
Moved region inference error reporting into own module.

6 years agoSwitched to while let in DFS and deriving Ord on ConstraintCategory.
David Wood [Wed, 20 Jun 2018 20:11:27 +0000 (21:11 +0100)]
Switched to while let in DFS and deriving Ord on ConstraintCategory.

6 years agoConstraints are now being categorized, sorted and the error labelled. Categorization...
David Wood [Tue, 12 Jun 2018 19:43:14 +0000 (20:43 +0100)]
Constraints are now being categorized, sorted and the error labelled. Categorization needs a bit of work.

6 years agoAdd two regression tests for const eval
Wesley Wiser [Sat, 30 Jun 2018 19:25:07 +0000 (15:25 -0400)]
Add two regression tests for const eval

6 years agoAdded bfs for constraint paths from regions.
David Wood [Mon, 11 Jun 2018 22:07:54 +0000 (23:07 +0100)]
Added bfs for constraint paths from regions.

6 years agodon't consider assignments to temporaries "interesting"
Niko Matsakis [Tue, 5 Jun 2018 10:13:28 +0000 (06:13 -0400)]
don't consider assignments to temporaries "interesting"

6 years agopropagate boring vs interesting causal info for constraints/tests
Niko Matsakis [Mon, 4 Jun 2018 16:25:12 +0000 (12:25 -0400)]
propagate boring vs interesting causal info for constraints/tests

6 years agocategorize `Locations` as interesting or boring
Niko Matsakis [Mon, 4 Jun 2018 15:19:43 +0000 (11:19 -0400)]
categorize `Locations` as interesting or boring

6 years agoremove the `at_location` from Locations
Niko Matsakis [Mon, 4 Jun 2018 13:29:36 +0000 (09:29 -0400)]
remove the `at_location` from Locations

We are not currently using it for anything; even polonius just uses
the `from_location`.

6 years agorename `ToLocations` to `NormalizeLocation`
Niko Matsakis [Mon, 4 Jun 2018 12:53:34 +0000 (08:53 -0400)]
rename `ToLocations` to `NormalizeLocation`

6 years agoAuto merge of #51883 - estebank:placement-suggestion, r=varkor
bors [Sun, 1 Jul 2018 13:37:05 +0000 (13:37 +0000)]
Auto merge of #51883 - estebank:placement-suggestion, r=varkor

Suggest correct comparison against negative literal

When parsing as emplacement syntax (`x<-1`), suggest the correct syntax
for comparison against a negative value (`x< -1`).

Fix #45651.

6 years agoAuto merge of #51855 - Eh2406:i51821, r=nikomatsakis
bors [Sun, 1 Jul 2018 10:41:51 +0000 (10:41 +0000)]
Auto merge of #51855 - Eh2406:i51821, r=nikomatsakis

A fix for 51821

This dedupe the vec of `OutlivesConstraint` using a `FxHashSet<(RegionVid, RegionVid)>` it alsow adds a `struct ConstraintSet` to encapsulate/ensure this behavere.

6 years agoremove the FxHashSet since it's not helping us in practice
Niko Matsakis [Sun, 1 Jul 2018 09:51:33 +0000 (05:51 -0400)]
remove the FxHashSet since it's not helping us in practice

It turns out that we don't have duplicates, just self-cycles.

6 years agoAuto merge of #51882 - varkor:check-type_dependent_defs, r=estebank
bors [Sun, 1 Jul 2018 08:41:50 +0000 (08:41 +0000)]
Auto merge of #51882 - varkor:check-type_dependent_defs, r=estebank

Always check type_dependent_defs

Directly indexing into `type_dependent_defs` has caused multiple ICEs in the past (https://github.com/rust-lang/rust/issues/46771, https://github.com/rust-lang/rust/issues/49241, etc.) and is almost certainly responsible for #51798 too. This PR ensures we always check `type_dependent_defs` first, which should prevent any more of these (or at least make them easier to track down).

6 years agoAuto merge of #51877 - oli-obk:lowering_cleanups3, r=cramertj
bors [Sun, 1 Jul 2018 06:37:23 +0000 (06:37 +0000)]
Auto merge of #51877 - oli-obk:lowering_cleanups3, r=cramertj

Lowering cleanups [3/N]

Needs https://github.com/rust-lang/rust/pull/51806 to be merged first

6 years agoAuto merge of #51869 - nnethercote:rm-clone_from, r=nikomatsakis
bors [Sun, 1 Jul 2018 04:23:29 +0000 (04:23 +0000)]
Auto merge of #51869 - nnethercote:rm-clone_from, r=nikomatsakis

Avoid needless allocations in `liveness_of_locals`.

We don't need to replace the heap-allocated bitset, we can just
overwrite its contents.

This speeds up most NLL benchmarks, the best by 1.5%.

r? @nikomatsakis

6 years agoAuto merge of #51943 - oli-obk:miriup, r=kennytm
bors [Sun, 1 Jul 2018 00:04:14 +0000 (00:04 +0000)]
Auto merge of #51943 - oli-obk:miriup, r=kennytm

Update the miri submodule

r? @kennytm

6 years agoAuto merge of #51717 - Mark-Simulacrum:snap, r=alexcrichton
bors [Sat, 30 Jun 2018 21:01:05 +0000 (21:01 +0000)]
Auto merge of #51717 - Mark-Simulacrum:snap, r=alexcrichton

Bootstrap from 1.28.0 beta

6 years agoNotice non-toplevel dll dependencies in rustbuild
Mark Simulacrum [Thu, 28 Jun 2018 16:06:42 +0000 (10:06 -0600)]
Notice non-toplevel dll dependencies in rustbuild

Previously Cargo would hardlink all the dependencies into the "root" as
foo.dll and the `toplevel` array would get populated with these, but
that's no longer the case. Instead, cargo will only do this for the
final artifacts/final libraries.

Rustbuild is updated to continue looping through the artifacts mentioned
instead of early-returning. This should fix the bug.

@alexcrichton found the cause of this and suggested this fix.

6 years agoBootstrap from 1.28.0-beta.3
Mark Simulacrum [Fri, 22 Jun 2018 15:48:43 +0000 (09:48 -0600)]
Bootstrap from 1.28.0-beta.3

6 years agoCopy undef_masks correctly for repeated bytes
Wesley Wiser [Sat, 30 Jun 2018 18:23:41 +0000 (14:23 -0400)]
Copy undef_masks correctly for repeated bytes

6 years agoAuto merge of #51849 - nikomatsakis:issue-51820-places-conflict, r=eddyb
bors [Sat, 30 Jun 2018 18:55:09 +0000 (18:55 +0000)]
Auto merge of #51849 - nikomatsakis:issue-51820-places-conflict, r=eddyb

optimize `places_conflict` to avoid complex vectors etc

Fixes #51820

6 years agoAuto merge of #51862 - estebank:lifetime-spans, r=nikomatsakis
bors [Sat, 30 Jun 2018 16:52:12 +0000 (16:52 +0000)]
Auto merge of #51862 - estebank:lifetime-spans, r=nikomatsakis

Point to lifetime spans on lifetime errors

6 years agoUpdate the miri submodule
Oliver Schneider [Sat, 30 Jun 2018 14:10:39 +0000 (16:10 +0200)]
Update the miri submodule

6 years agoAuto merge of #51828 - kennytm:no-simd-swap-for-mac, r=alexcrichton
bors [Sat, 30 Jun 2018 14:00:24 +0000 (14:00 +0000)]
Auto merge of #51828 - kennytm:no-simd-swap-for-mac, r=alexcrichton

Do not allow LLVM to increase a TLS's alignment on macOS.

This addresses the various TLS segfault on macOS 10.10.

Fix #51794.
Fix #51758.
Fix #50867.
Fix #48866.
Fix #46355.
Fix #44056.

6 years agoDo not allow LLVM to increase a TLS's alignment on macOS.
kennytm [Wed, 27 Jun 2018 22:24:09 +0000 (06:24 +0800)]
Do not allow LLVM to increase a TLS's alignment on macOS.

6 years agoRemove some global state from the lowering pass
Oliver Schneider [Tue, 19 Jun 2018 11:47:53 +0000 (13:47 +0200)]
Remove some global state from the lowering pass

6 years agoRemove unused field
Oliver Schneider [Thu, 28 Jun 2018 12:31:46 +0000 (14:31 +0200)]
Remove unused field

6 years agoReduce repetition around `lower_method_sig`
Oliver Schneider [Tue, 19 Jun 2018 08:09:00 +0000 (10:09 +0200)]
Reduce repetition around `lower_method_sig`

6 years agoDeduplicate `IsAsync::Async` match
Oliver Schneider [Wed, 27 Jun 2018 15:32:48 +0000 (17:32 +0200)]
Deduplicate `IsAsync::Async` match

6 years agoAuto merge of #51762 - petrochenkov:oh-hi-mark, r=oli-obk
bors [Sat, 30 Jun 2018 09:19:21 +0000 (09:19 +0000)]
Auto merge of #51762 - petrochenkov:oh-hi-mark, r=oli-obk

hygiene: Implement transparent marks and use them for call-site hygiene in proc-macros

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

6 years agoAuto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertj
bors [Sat, 30 Jun 2018 07:10:18 +0000 (07:10 +0000)]
Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertj

Lowering cleanups [1/N]

6 years agoFix relocations to include repeated values
Wesley Wiser [Sat, 30 Jun 2018 04:44:58 +0000 (00:44 -0400)]
Fix relocations to include repeated values

6 years agoAuto merge of #51178 - GabrielMajeri:os-str-compare, r=SimonSapin
bors [Sat, 30 Jun 2018 04:03:14 +0000 (04:03 +0000)]
Auto merge of #51178 - GabrielMajeri:os-str-compare, r=SimonSapin

Implement PartialEq between &str and OsString

This fixes #49854.

It allows equality comparison between `OsString` values and `str` references, such as `os_string == "something"`.

6 years agoInline a few `UndefMask` methods.
Wesley Wiser [Sat, 30 Jun 2018 03:33:17 +0000 (23:33 -0400)]
Inline a few `UndefMask` methods.

This saves 2.5 seconds on the test program.

6 years agoOptimize `copy_undef_mask()` to use one pass
Wesley Wiser [Sat, 30 Jun 2018 02:26:15 +0000 (22:26 -0400)]
Optimize `copy_undef_mask()` to use one pass

This saves 0.5 seconds on the test compilation.

6 years agoOptimize `copy_undef_mask()` by lifting some loop invariant operations
Wesley Wiser [Sat, 30 Jun 2018 00:22:35 +0000 (20:22 -0400)]
Optimize `copy_undef_mask()` by lifting some loop invariant operations

This saves 4.5 seconds and takes the compile time down to 5.5 seconds.

6 years agoAddress comments
Vadim Petrochenkov [Fri, 29 Jun 2018 22:53:17 +0000 (01:53 +0300)]
Address comments

6 years agoRestore the old behavior of `$crate` in nested `macro_rules`
Vadim Petrochenkov [Fri, 29 Jun 2018 00:45:47 +0000 (03:45 +0300)]
Restore the old behavior of `$crate` in nested `macro_rules`

`$crate` is not resolved at def-site of a macro, but rather at "transitive def-site"

6 years agoFortify dummy span checking
Vadim Petrochenkov [Sun, 24 Jun 2018 22:00:21 +0000 (01:00 +0300)]
Fortify dummy span checking

6 years agoproc-macro: Use transparent marks for call-site hygiene
Vadim Petrochenkov [Sun, 24 Jun 2018 17:02:24 +0000 (20:02 +0300)]
proc-macro: Use transparent marks for call-site hygiene

6 years agohygiene: Implement transparent marks
Vadim Petrochenkov [Sun, 24 Jun 2018 16:54:23 +0000 (19:54 +0300)]
hygiene: Implement transparent marks

6 years agoexpansion: Give names to some fields of `SyntaxExtension`
Vadim Petrochenkov [Sun, 24 Jun 2018 16:24:51 +0000 (19:24 +0300)]
expansion: Give names to some fields of `SyntaxExtension`

6 years agoresolve: Cleanup `resolve_crate_root`
Vadim Petrochenkov [Sun, 24 Jun 2018 16:12:00 +0000 (19:12 +0300)]
resolve: Cleanup `resolve_crate_root`

6 years agoAuto merge of #46720 - estebank:issue-46302, r=nikomatsakis
bors [Fri, 29 Jun 2018 20:22:03 +0000 (20:22 +0000)]
Auto merge of #46720 - estebank:issue-46302, r=nikomatsakis

Fix incorrect type mismatch label pointing at return type

CC #46302.

6 years agoFix incorrect type mismatch label pointing at return type
Esteban Küber [Thu, 14 Dec 2017 01:34:47 +0000 (17:34 -0800)]
Fix incorrect type mismatch label pointing at return type

6 years agoAuto merge of #51569 - SimonSapin:liballoc, r=sfackler
bors [Fri, 29 Jun 2018 16:48:57 +0000 (16:48 +0000)]
Auto merge of #51569 - SimonSapin:liballoc, r=sfackler

Make the public API of the alloc crate a subset of std

This only affects **unstable** APIs.

I plan to submit an RFC proposing to stabilize the crate. The reason it isn’t stable yet (https://github.com/rust-lang/rust/issues/27783) is in case we end up merging the standard library crates into one. However the `core` crate is already stable, so if that happens we’ll need to keep it working somehow (likely by making replacing its contents by `pub use` items). We can do the same for `alloc`. This PR will hopefully make this easier, but even if that doesn’t happen consistency with `std` seems good.

6 years agoAuto merge of #51891 - glandium:llvm, r=alexcrichton
bors [Fri, 29 Jun 2018 14:43:40 +0000 (14:43 +0000)]
Auto merge of #51891 - glandium:llvm, r=alexcrichton

Update LLVM to 1c817c7a0c828b8fc8e8e462afbe5db41c7052d1

https://github.com/rust-lang/llvm/pull/118
https://github.com/rust-lang/llvm/pull/119

6 years agoAuto merge of #51729 - matthewjasper:move-errors, r=nikomatsakis
bors [Fri, 29 Jun 2018 12:40:12 +0000 (12:40 +0000)]
Auto merge of #51729 - matthewjasper:move-errors, r=nikomatsakis

[NLL] Better move errors

Make a number of changes to improve the quality of NLL cannot move errors.

* Group errors that occur in the same `match` with the same cause.
* Suggest `ref`, `&` or removing `*` to avoid the move.
* Show the place being matched on.

Differences from AST borrowck:

* `&` is suggested over `ref` when matching on a place that can't be moved from.
* Removing `*` is suggested instead of adding `&` when applicable.
* Sub-pattern spans aren't used, this would probably need Spans on Places.

Closes #45699
Closes #46627
Closes #51187
Closes #51189

r? @pnkfelix

6 years agoliballoc docs: Remove “not intended for general usage”
Simon Sapin [Sat, 23 Jun 2018 19:48:56 +0000 (21:48 +0200)]
liballoc docs: Remove “not intended for general usage”

6 years agoRename alloc::arc to alloc::sync, to match std::sync
Simon Sapin [Fri, 15 Jun 2018 02:07:09 +0000 (04:07 +0200)]
Rename alloc::arc to alloc::sync, to match std::sync

6 years agoRemove the Vec and String reexports at the root of the alloc crate
Simon Sapin [Fri, 15 Jun 2018 01:59:59 +0000 (03:59 +0200)]
Remove the Vec and String reexports at the root of the alloc crate

… since `std` has no corresponding reexports.

Use `alloc::vec::Vec` and `alloc::string::String` instead.

6 years agoMove core::alloc::CollectionAllocErr to alloc::collections
Simon Sapin [Fri, 15 Jun 2018 01:56:35 +0000 (03:56 +0200)]
Move core::alloc::CollectionAllocErr to alloc::collections

6 years agoMove some alloc crate top-level items to a new alloc::collections module
Simon Sapin [Fri, 15 Jun 2018 01:52:25 +0000 (03:52 +0200)]
Move some alloc crate top-level items to a new alloc::collections module

This matches std::collections

6 years agoRemove the unstable alloc::allocator module reexport, deprecated since 1.27
Simon Sapin [Fri, 15 Jun 2018 01:39:17 +0000 (03:39 +0200)]
Remove the unstable alloc::allocator module reexport, deprecated since 1.27

6 years agoMake raw_vec perma-unstable and hidden
Simon Sapin [Fri, 15 Jun 2018 01:36:34 +0000 (03:36 +0200)]
Make raw_vec perma-unstable and hidden

6 years agoAdd run-pass test
Gabriel Majeri [Tue, 5 Jun 2018 05:50:06 +0000 (08:50 +0300)]
Add run-pass test

6 years agoFix stability attributes
Gabriel Majeri [Wed, 30 May 2018 05:26:24 +0000 (08:26 +0300)]
Fix stability attributes

6 years agoImplement PartialEq between &str and OsString
Gabriel Majeri [Tue, 29 May 2018 16:16:49 +0000 (19:16 +0300)]
Implement PartialEq between &str and OsString

Allows for example `os_string == "something"`

6 years agoAuto merge of #50526 - moxian:just-fix, r=alexcrichton
bors [Fri, 29 Jun 2018 09:42:40 +0000 (09:42 +0000)]
Auto merge of #50526 - moxian:just-fix, r=alexcrichton

Add a fallback for stacktrace printing for older Windows versions.

Some time ago we switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context.
Unfortunately, said new alternatives are not present in older dbghelp.dll versions.
In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends.

Tested on my Windows 7 - both msvc and gnu versions produce a readable stacktrace.

Fixes #50138

6 years agoAuto merge of #51290 - Pslydhh:master, r=alexcrichton
bors [Fri, 29 Jun 2018 07:34:13 +0000 (07:34 +0000)]
Auto merge of #51290 - Pslydhh:master, r=alexcrichton

park/park_timeout: prohibit spurious wakeups in next park

<pre><code>
// The implementation currently uses the trivial strategy of a Mutex+Condvar
// with wakeup flag, which does not actually allow spurious wakeups.
</pre></code>

Because does not actually allow spurious wakeups.
so we have let thread.inner.cvar.wait(m) in the loop to prohibit spurious wakeups.
but if notified after we locked, this notification doesn't be consumed, it return, the next park will consume this notification...this is also 'spurious wakeup' case, 'one unpark() wakeups two  park()'.

We should improve this situation:
`thread.inner.state.store(EMPTY, SeqCst);`

6 years agoUpdate LLVM to 1c817c7a0c828b8fc8e8e462afbe5db41c7052d1
Mike Hommey [Fri, 29 Jun 2018 04:58:15 +0000 (13:58 +0900)]
Update LLVM to 1c817c7a0c828b8fc8e8e462afbe5db41c7052d1

https://github.com/rust-lang/llvm/pull/118
https://github.com/rust-lang/llvm/pull/119

6 years agoAuto merge of #50357 - seanmonstar:arc-weak-null, r=KodrAus
bors [Fri, 29 Jun 2018 04:09:02 +0000 (04:09 +0000)]
Auto merge of #50357 - seanmonstar:arc-weak-null, r=KodrAus

Arc: remove unused allocation from Weak::new()

It seems non-obvious that calling `Weak::new()` actually allocates space for the entire size of `T`, even though you can **never** access that data from such a constructed weak pointer. Besides that, if someone were to create many `Weak:new()`s, they could be unknowingly wasting a bunch of memory.

This change makes it so that `Weak::new()` allocates no memory at all. Instead, it is created with a null pointer. The only things done with a `Weak` are trying to upgrade, cloning, and dropping, meaning there are very few places that the code actually needs to check if the pointer is null.

6 years agoAuto merge of #51592 - GuillaumeGomez:fix-macro-doc-search, r=GuillaumeGomez
bors [Fri, 29 Jun 2018 01:05:02 +0000 (01:05 +0000)]
Auto merge of #51592 - GuillaumeGomez:fix-macro-doc-search, r=GuillaumeGomez

Fix macro missing from doc search

Fixes #51095.

r? @QuietMisdreavus

6 years agoRename `IdxSet::clone_from`.
Nicholas Nethercote [Thu, 28 Jun 2018 06:20:32 +0000 (16:20 +1000)]
Rename `IdxSet::clone_from`.

The current situation is something of a mess.

- `IdxSetBuf` derefs to `IdxSet`.
- `IdxSetBuf` implements `Clone`, and therefore has a provided `clone_from`
  method, which does allocation and so is expensive.
- `IdxSet` has a `clone_from` method that is non-allocating and therefore
  cheap, but this method is not from the `Clone` trait.

As a result, if you have an `IdxSetBuf` called `b`, if you call
`b.clone_from(b2)` you'll get the expensive `IdxSetBuf` method, but if you call
`(*b).clone_from(b2)` you'll get the cheap `IdxSetBuf` method.
`liveness_of_locals()` does the former, presumably unintentionally, and
therefore does lots of unnecessary allocations.

Having a `clone_from` method that isn't from the `Clone` trait is a bad idea in
general, so this patch renames it as `overwrite`. This avoids the unnecessary
allocations in `liveness_of_locals()`, speeding up most NLL benchmarks, the
best by 1.5%. It also means that calls of the form `(*b).clone_from(b2)` can be
rewritten as `b.overwrite(b2)`.

6 years agoAuto merge of #51884 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Thu, 28 Jun 2018 22:20:14 +0000 (22:20 +0000)]
Auto merge of #51884 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 6 pull requests

Successful merges:

 - #51636 (Refactor error reporting of constants)
 - #51765 (Use assert_eq! in copy_from_slice)
 - #51822 (Provide existing ref suggestions for more E0308 errors)
 - #51839 (Detect overflows of non u32 shifts)
 - #51868 (Remove process::id from 'Stabilized APIs' in 1.27.0 release notes)
 - #51875 (Explicitely disable WASM code generation for Emscripten)

Failed merges:

r? @ghost

6 years agoRollup merge of #51875 - badboy:emscripten-no-wasm, r=nikomatsakis
Mark Rousskov [Thu, 28 Jun 2018 22:07:16 +0000 (16:07 -0600)]
Rollup merge of #51875 - badboy:emscripten-no-wasm, r=nikomatsakis

Explicitely disable WASM code generation for Emscripten

Emscripten changed the default behavior recently:
https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/ChangeLog.markdown#v1381-05172018

It now defaults to WebAssembly and requires an explicit flag to generate asm.js.
WASM=0 is also valid for older emcc and thus doesn't break it.

6 years agoRollup merge of #51868 - Lireer:master, r=pietroalbini
Mark Rousskov [Thu, 28 Jun 2018 22:07:15 +0000 (16:07 -0600)]
Rollup merge of #51868 - Lireer:master, r=pietroalbini

Remove process::id from 'Stabilized APIs' in 1.27.0 release notes

process::id was already stabilized in 1.26.0 and is marked as such in the docs.

6 years agoRollup merge of #51839 - oli-obk:const_shift_overflow, r=nikomatsakis
Mark Rousskov [Thu, 28 Jun 2018 22:07:14 +0000 (16:07 -0600)]
Rollup merge of #51839 - oli-obk:const_shift_overflow, r=nikomatsakis

Detect overflows of non u32 shifts

6 years agoRollup merge of #51822 - estebank:suggest-more, r=nikomatsakis
Mark Rousskov [Thu, 28 Jun 2018 22:07:13 +0000 (16:07 -0600)]
Rollup merge of #51822 - estebank:suggest-more, r=nikomatsakis

Provide existing ref suggestions for more E0308 errors

6 years agoRollup merge of #51765 - jonas-schievink:patch-1, r=KodrAus
Mark Rousskov [Thu, 28 Jun 2018 22:07:12 +0000 (16:07 -0600)]
Rollup merge of #51765 - jonas-schievink:patch-1, r=KodrAus

Use assert_eq! in copy_from_slice

This will print both lengths when the assertion fails instead of just saying that they're different.

Output of current stable and nightly (modulo the exact line number):
```
thread 'main' panicked at 'destination and source slices have different lengths', libcore/slice/mod.rs:1645:9
```

Output after this PR:
```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `123`,
 right: `456`: destination and source slices have different lengths', libcore/slice/mod.rs:1645:9
```

Note that I have not run the tests locally.

6 years agoRollup merge of #51636 - oli-obk:const_diagnostics, r=eddyb
Mark Rousskov [Thu, 28 Jun 2018 22:07:10 +0000 (16:07 -0600)]
Rollup merge of #51636 - oli-obk:const_diagnostics, r=eddyb

Refactor error reporting of constants

cc @eddyb

This PR should not change any behaviour. It solely simplifies the internal handling of the errors

6 years agoSuggest correct comparison against negative literal
Esteban Küber [Thu, 28 Jun 2018 21:58:54 +0000 (14:58 -0700)]
Suggest correct comparison against negative literal

When parsing as emplacement syntax (`x<-1`), suggest the correct syntax
for comparison against a negative value (`x< -1`).

6 years agoChange traits to bare FnMut where possible.
moxian [Mon, 4 Jun 2018 11:00:12 +0000 (11:00 +0000)]
Change traits to bare FnMut where possible.

6 years agoMake msvc symbol extraction/printing functions generic.
moxian [Fri, 18 May 2018 12:33:23 +0000 (12:33 +0000)]
Make msvc symbol extraction/printing functions generic.

6 years agoMake stackwalking generic instead of matching on enum variants.
moxian [Fri, 18 May 2018 11:38:50 +0000 (11:38 +0000)]
Make stackwalking generic instead of matching on enum variants.

6 years agoLoad backtrace-related functions only once
moxian [Sun, 13 May 2018 08:41:24 +0000 (08:41 +0000)]
Load backtrace-related functions only once

.. and pass them around in BacktraceContext.

6 years agoSplit separate stackwalk variants into their own functions
moxian [Sun, 13 May 2018 04:38:43 +0000 (04:38 +0000)]
Split separate stackwalk variants into their own functions

.. rather than having them be one giant match statement.

6 years agoAdd a fallback for stacktrace printing for older Windows versions.
moxian [Tue, 8 May 2018 06:19:55 +0000 (06:19 +0000)]
Add a fallback for stacktrace printing for older Windows versions.

PR #47252 switched stack inspection functions of dbghelp.dll
to their newer alternatives that also capture inlined context.
Unfortunately, said new alternatives are not present in older
dbghelp.dll versions.
In particular Windows 7 at the time of writing has dbghelp.dll
version 6.1.7601 from 2010, that lacks StackWalkEx and friends.

Fixes #50138

6 years agoAlways check type_dependent_defs
varkor [Thu, 28 Jun 2018 21:49:01 +0000 (22:49 +0100)]
Always check type_dependent_defs

6 years agoFix rebase
Esteban Küber [Thu, 28 Jun 2018 18:14:31 +0000 (11:14 -0700)]
Fix rebase

6 years agoArc: remove unused allocation from Weak::new()
Sean McArthur [Thu, 28 Jun 2018 18:49:47 +0000 (11:49 -0700)]
Arc: remove unused allocation from Weak::new()

6 years agoProvide existing ref suggestions for more E0308 errors
Esteban Küber [Tue, 26 Jun 2018 18:39:37 +0000 (11:39 -0700)]
Provide existing ref suggestions for more E0308 errors

6 years agoreview comments: unify duplicated code
Esteban Küber [Thu, 28 Jun 2018 18:06:30 +0000 (11:06 -0700)]
review comments: unify duplicated code

6 years agoAlso point to free named region on lifetime errors
Esteban Küber [Thu, 28 Jun 2018 00:41:15 +0000 (17:41 -0700)]
Also point to free named region on lifetime errors

6 years agoExtend support to `get_generics` for all `NodeItem`s
Esteban Küber [Wed, 27 Jun 2018 23:44:39 +0000 (16:44 -0700)]
Extend support to `get_generics` for all `NodeItem`s

6 years agoPoint to lifetime in fn definition on lifetime error note
Esteban Küber [Wed, 27 Jun 2018 23:27:47 +0000 (16:27 -0700)]
Point to lifetime in fn definition on lifetime error note

6 years agoPoint at lifetimes instead of def span for E0195
Esteban Küber [Wed, 27 Jun 2018 22:25:18 +0000 (15:25 -0700)]
Point at lifetimes instead of def span for E0195

6 years agoAuto merge of #51687 - japaric:gh51671, r=alexcrichton
bors [Thu, 28 Jun 2018 15:34:17 +0000 (15:34 +0000)]
Auto merge of #51687 - japaric:gh51671, r=alexcrichton

translate / export weak lang items

see #51671 for details

fixes #51671
fixes #51342

r? @michaelwoerister or @alexcrichton

6 years agoadd comments
Eh2406 [Wed, 27 Jun 2018 22:57:11 +0000 (18:57 -0400)]
add comments

6 years agouse deref instead of inner
Eh2406 [Wed, 27 Jun 2018 22:50:48 +0000 (18:50 -0400)]
use deref instead of inner

6 years agoeach_affected_by_dirty
Eh2406 [Wed, 27 Jun 2018 22:15:57 +0000 (18:15 -0400)]
each_affected_by_dirty