]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMake custom trait object for `Future` generic
Josef Reinhard Brandl [Sat, 30 Jun 2018 15:26:38 +0000 (17:26 +0200)]
Make custom trait object for `Future` generic

6 years agoAuto merge of #51645 - marco-c:error_when_incremental_and_profile, r=michaelwoerister
bors [Mon, 2 Jul 2018 11:58:45 +0000 (11:58 +0000)]
Auto merge of #51645 - marco-c:error_when_incremental_and_profile, r=michaelwoerister

Raise an error if gcov profiling and incremental compilation are both enabled

Fixes #50203.

6 years agoClippy tool also has only a single LICENSE file
Oliver Schneider [Mon, 2 Jul 2018 11:57:29 +0000 (13:57 +0200)]
Clippy tool also has only a single LICENSE file

6 years agoUpdate stdsimd
est31 [Fri, 22 Jun 2018 00:02:51 +0000 (02:02 +0200)]
Update stdsimd

6 years agoEmit column info in debuginfo for non msvc like targets
est31 [Mon, 2 Jul 2018 09:40:32 +0000 (11:40 +0200)]
Emit column info in debuginfo for non msvc like targets

6 years agoUpdate rustdoc
Oliver Schneider [Mon, 2 Jul 2018 08:37:49 +0000 (10:37 +0200)]
Update rustdoc

6 years agoMake sure clippy does not duplicate depenencies
Oliver Schneider [Mon, 2 Jul 2018 08:36:07 +0000 (10:36 +0200)]
Make sure clippy does not duplicate depenencies

6 years agoAuto merge of #51893 - nnethercote:BTreeMap-clone-noalloc, r=nnethercote
bors [Mon, 2 Jul 2018 08:28:12 +0000 (08:28 +0000)]
Auto merge of #51893 - nnethercote:BTreeMap-clone-noalloc, r=nnethercote

Make `BTreeMap::clone()` not allocate when cloning an empty tree.

r? @Gankro

CC @porglezomp

6 years agoGet rid of `TyImplTraitExistential`
Oliver Schneider [Fri, 29 Jun 2018 08:58:17 +0000 (10:58 +0200)]
Get rid of `TyImplTraitExistential`

6 years agoAuto merge of #51931 - cramertj:rm-libbacktrace, r=alexcrichton
bors [Mon, 2 Jul 2018 06:32:16 +0000 (06:32 +0000)]
Auto merge of #51931 - cramertj:rm-libbacktrace, r=alexcrichton

Use in-tree libbacktrace on Fuchsia

cc @abarth

r? @alexcrichton
(welcome back! :smile: )

6 years agoadd FIXMEs pleading for post-@ edit of commentary on mem_categorization
Zack M. Davis [Sat, 2 Jun 2018 23:49:34 +0000 (16:49 -0700)]
add FIXMEs pleading for post-@ edit of commentary on mem_categorization

(The present author fears not being knowledgeable enough to rewrite the
comments unilaterally; merely calling it out is a lazy half-measure, but
at least doesn't actively make things worse the way an ill-informed
rewrite would.)

6 years agouse HirId in middle::mem_categorization::cmt_, and consequences of that
Zack M. Davis [Sun, 3 Jun 2018 01:50:40 +0000 (18:50 -0700)]
use HirId in middle::mem_categorization::cmt_, and consequences of that

For the HirIdification initiative #50928.

6 years agoAuto merge of #51866 - zackmdavis:hir_making_each_day_of_the_year, r=petrochenkov
bors [Mon, 2 Jul 2018 03:18:49 +0000 (03:18 +0000)]
Auto merge of #51866 - zackmdavis:hir_making_each_day_of_the_year, r=petrochenkov

add modifier keyword spans to hir::Visibility; improve unreachable-pub, private-no-mangle lint suggestions

#50455 pointed out that the unreachable-pub suggestion for brace-grouped `use`s was bogus; #50476 partially ameliorated this by marking the suggestion as `Applicability::MaybeIncorrect`, but this is the actual fix.

Meanwhile, another application of having spans available in `hir::Visibility` is found in the private-no-mangle lints, where we can now issue a suggestion to use `pub` if the item has a more restricted visibility marker (this seems much less likely to come up in practice than not having any visibility keyword at all, but thoroughness is a virtue). While we're there, we can also add a helpful note if the item does have a `pub` (but triggered the lint presumably because enclosing modules were private).

![hir_vis](https://user-images.githubusercontent.com/1076988/42018064-ca830290-7a65-11e8-9c4c-48bc846f861f.png)

r? @nrc
cc @Manishearth

6 years agoDo not suggest changes to str literal if it isn't one
Esteban Küber [Mon, 2 Jul 2018 03:03:35 +0000 (20:03 -0700)]
Do not suggest changes to str literal if it isn't one

6 years agoMake `BTreeMap::clone()` not allocate when cloning an empty tree.
Nicholas Nethercote [Fri, 29 Jun 2018 07:02:38 +0000 (17:02 +1000)]
Make `BTreeMap::clone()` not allocate when cloning an empty tree.

6 years agoAuto merge of #51864 - est31:libc_update, r=alexcrichton
bors [Mon, 2 Jul 2018 01:16:13 +0000 (01:16 +0000)]
Auto merge of #51864 - est31:libc_update, r=alexcrichton

Update liblibc

This updates the libc submodule

6 years agoRun rustfmt
Santiago Pastorino [Thu, 28 Jun 2018 23:45:08 +0000 (20:45 -0300)]
Run rustfmt

6 years agoMake causal tracking lazy
Santiago Pastorino [Sun, 1 Jul 2018 22:43:01 +0000 (19:43 -0300)]
Make causal tracking lazy

6 years agoMove find_use stuff to it's own file
Santiago Pastorino [Wed, 27 Jun 2018 19:13:33 +0000 (16:13 -0300)]
Move find_use stuff to it's own file

6 years agolet add_element return by itself
Santiago Pastorino [Tue, 26 Jun 2018 17:24:54 +0000 (14:24 -0300)]
let add_element return by itself

6 years agoAuto merge of #51110 - alexreg:new-static-eval-rules, r=eddyb
bors [Sun, 1 Jul 2018 23:00:27 +0000 (23:00 +0000)]
Auto merge of #51110 - alexreg:new-static-eval-rules, r=eddyb

Loosened rules involving statics mentioning other statics

Before this PR, trying to mention a static in any way other than taking a reference to it caused a compile-time error. So, while

```rust
static A: u32 = 42;
static B: &u32 = &A;
```

compiles successfully,

```rust
static A: u32 = 42;
static B: u32 = A; // error
```

and

```rust
static A: u32 = 42;
static B: u32 = *&A; // error
```

are not possible to express in Rust. On the other hand, introducing an intermediate `const fn` can presently allow one to do just that:

```rust
static A: u32 = 42;
static B: u32 = foo(&A); // success!

const fn foo(a: &u32) -> u32 {
    *a
}
```

Preventing `const fn` from allowing to work around the ban on reading from statics would cripple `const fn` almost into uselessness.
Additionally, the limitation for reading from statics comes from the old const evaluator(s) and is not shared by `miri`.

This PR loosens the rules around use of statics to allow statics to evaluate other statics by value, allowing all of the above examples to compile and run successfully.
Reads from extern (foreign) statics are however still disallowed by miri, because there is no compile-time value to be read.

```rust
extern static A: u32;

static B: u32 = A; // error
```

This opens up a new avenue of potential issues, as a static can now not just refer to other statics or read from other statics, but even contain references that point into itself.
While it might seem like this could cause subtle bugs like allowing a static to be initialized by its own value, this is inherently impossible in miri.
Reading from a static causes the `const_eval` query for that static to be invoked. Calling the `const_eval` query for a static while already inside the `const_eval` query of said static will cause cycle errors.
It is not possible to accidentally create a bug in miri that would enable initializing a static with itself, because the memory of the static *does not exist* while being initialized.
The memory is not uninitialized, it is not there. Thus any change that would accidentally allow reading from a not yet initialized static would cause ICEs.

Tests have been modified according to the new rules, and new tests have been added for writing to `static mut`s within definitions of statics (which needs to fail), and incremental compilation with complex/interlinking static definitions.
Note that incremental compilation did not need to be adjusted, because all of this was already possible before with workarounds (like intermediate `const fn`s) and the encoding/decoding already supports all the possible cases.

r? @eddyb

6 years agoAuto merge of #51969 - pietroalbini:rollup, r=pietroalbini
bors [Sun, 1 Jul 2018 20:48:57 +0000 (20:48 +0000)]
Auto merge of #51969 - pietroalbini:rollup, r=pietroalbini

Rollup of 7 pull requests

Successful merges:

 - #51511 (Stabilize Iterator::flatten in 1.29, fixes #48213.)
 - #51853 (Fix some doc links)
 - #51890 (Fix inconsequential typo in GlobalAlloc doc example)
 - #51920 (use literal span for concrete type suggestion)
 - #51921 (improve the error message when `#[panic_implementation]` is missing)
 - #51922 (rename the llvm-tools component to llvm-tools-preview and tweak its image)
 - #51961 (Fix typo in /src/librustc_resolve/lib.rs)

Failed merges:

r? @ghost

6 years agoRollup merge of #51961 - 11Takanori:fix-typo, r=petrochenkov
Pietro Albini [Sun, 1 Jul 2018 19:18:51 +0000 (21:18 +0200)]
Rollup merge of #51961 - 11Takanori:fix-typo, r=petrochenkov

Fix typo in /src/librustc_resolve/lib.rs

absoluate -> absolute

6 years agoRollup merge of #51922 - japaric:llvm-tools-preview, r=alexcrichton
Pietro Albini [Sun, 1 Jul 2018 19:18:50 +0000 (21:18 +0200)]
Rollup merge of #51922 - japaric:llvm-tools-preview, r=alexcrichton

rename the llvm-tools component to llvm-tools-preview and tweak its image

as per https://github.com/rust-lang/rust/issues/49584#issuecomment-401217483

r? @alexcrichton or @Mark-Simulacrum

6 years agoRollup merge of #51921 - japaric:panic-impl-error, r=nagisa
Pietro Albini [Sun, 1 Jul 2018 19:18:49 +0000 (21:18 +0200)]
Rollup merge of #51921 - japaric:panic-impl-error, r=nagisa

improve the error message when `#[panic_implementation]` is missing

closes #51341

r? @nagisa
cc @phil-opp

6 years agoRollup merge of #51920 - euclio:concrete-type-suggestion, r=estebank
Pietro Albini [Sun, 1 Jul 2018 19:18:47 +0000 (21:18 +0200)]
Rollup merge of #51920 - euclio:concrete-type-suggestion, r=estebank

use literal span for concrete type suggestion

Fixes #51874.

r? @estebank

6 years agoRollup merge of #51890 - Ixrec:patch-3, r=alexcrichton
Pietro Albini [Sun, 1 Jul 2018 19:18:46 +0000 (21:18 +0200)]
Rollup merge of #51890 - Ixrec:patch-3, r=alexcrichton

Fix inconsequential typo in GlobalAlloc doc example

6 years agoRollup merge of #51853 - MajorBreakfast:fix-doc-links, r=cramertj
Pietro Albini [Sun, 1 Jul 2018 19:18:45 +0000 (21:18 +0200)]
Rollup merge of #51853 - MajorBreakfast:fix-doc-links, r=cramertj

Fix some doc links

The futures crate CI always fails because of these intra doc links. I hope that this will fix this issue.

r? @steveklabnik
@cramertj

Edit: I added @steveklabnik as reviewer because this PR also adjusts a link in `src/libstd/error.rs`

6 years agoRollup merge of #51511 - Centril:feature/stabilize_iterator_flatten, r=SimonSapin
Pietro Albini [Sun, 1 Jul 2018 19:18:43 +0000 (21:18 +0200)]
Rollup merge of #51511 - Centril:feature/stabilize_iterator_flatten, r=SimonSapin

Stabilize Iterator::flatten in 1.29, fixes #48213.

This PR stabilizes [`Iterator::flatten`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.flatten) in *version 1.29* (1.28 goes to beta in 10 days, I don't think there's enough time to land it in that time, but let's see...).

Tracking issue is:  #48213.

cc @bluss re. itertools.
r? @SimonSapin
ping @pietroalbini -- let's do a crater run when this passes CI :)

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 agoUpdate liblibc
est31 [Thu, 28 Jun 2018 05:26:01 +0000 (07:26 +0200)]
Update liblibc

6 years agocall it `hir::VisibilityKind` instead of `hir::Visibility_:*`
Zack M. Davis [Sun, 1 Jul 2018 18:05:10 +0000 (11:05 -0700)]
call it `hir::VisibilityKind` instead of `hir::Visibility_:*`

It was pointed out in review that the glob-exported
underscore-suffixed convention for `Spanned` HIR nodes is no longer
preferred: see February 2016's #31487 for AST's migration away from
this style towards properly namespaced NodeKind enums.

This concerns #51968.

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 agoupdate mir-opt tests
Niko Matsakis [Fri, 29 Jun 2018 14:04:17 +0000 (10:04 -0400)]
update mir-opt tests

6 years agoremove the `ins` set altogether
Niko Matsakis [Fri, 29 Jun 2018 10:47:12 +0000 (06:47 -0400)]
remove the `ins` set altogether

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 agoUpdate clippy submodule
Oliver Schneider [Sun, 1 Jul 2018 11:39:27 +0000 (13:39 +0200)]
Update clippy submodule

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 agouse `WorkQueue` to track dirty bits in liveness
Niko Matsakis [Fri, 29 Jun 2018 10:38:56 +0000 (06:38 -0400)]
use `WorkQueue` to track dirty bits in liveness

6 years agocreate a new `WorkQueue` data structure
Niko Matsakis [Fri, 29 Jun 2018 10:38:48 +0000 (06:38 -0400)]
create a new `WorkQueue` data structure

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 agoabsoluate -> absolute
Takanori Ishibashi [Sun, 1 Jul 2018 08:37:42 +0000 (17:37 +0900)]
absoluate -> absolute

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 agoin which the private/restricted-in-public error messaging gets specific
Zack M. Davis [Sun, 1 Jul 2018 05:08:27 +0000 (22:08 -0700)]
in which the private/restricted-in-public error messaging gets specific

April 2016's Issue #33174 called out the E0446 diagnostics as
confusing. While adding the name of the restricted type to the message
(548e681f) clarified matters somewhat, Esteban Küber pointed out that we
could stand to place a secondary span on the restricted type.

Here, we differentiate between crate-visible, truly private, and
otherwise restricted types, and place a secondary span specifically on
the visibility modifier of the restricted type's declaration (which we
can do now that HIR visibilities have spans!).

At long last, this resolves #33174.

6 years agoprivate no-mangle lints: help hint note if visibility modifier is `pub`
Zack M. Davis [Thu, 28 Jun 2018 05:50:24 +0000 (22:50 -0700)]
private no-mangle lints: help hint note if visibility modifier is `pub`

If the item is `pub`, one imagines users being confused as to why it's
not reachable/exported; a code suggestion is beyond our local knowledge
here, but we can at least offer a prose hint. (Thanks to Vadim
Petrochenkov for shooting down the present author's original bad idea
for the note text.)

While we're here, use proper HELP expectations instead of ad hoc
comments to communicate (and now, enforce) the expected suggestions in
test/ui/lint/suggestions.rs.

6 years agoprivate no-mangle lints: issue suggestion for restricted visibility
Zack M. Davis [Thu, 28 Jun 2018 05:30:23 +0000 (22:30 -0700)]
private no-mangle lints: issue suggestion for restricted visibility

This is probably quite a lot less likely to come up in practice than the
"inherited" (no visibility keyword) case, but now that we have
visibility spans in the HIR, we can do this, and it presumably doesn't
hurt to be exhaustive. (Who can say but that the attention to detail
just might knock someone's socks off, someday, somewhere?)

This is inspired by #47383.

6 years agounreachable_pub lint: grab `pub` span from HIR rather than inferring it
Zack M. Davis [Thu, 28 Jun 2018 04:23:18 +0000 (21:23 -0700)]
unreachable_pub lint: grab `pub` span from HIR rather than inferring it

This is a true fix for #50455, superior to the mere bandage offered
in #50476.

6 years agoin which hir::Visibility recalls whence it came (i.e., becomes Spanned)
Zack M. Davis [Sun, 1 Jul 2018 03:34:18 +0000 (20:34 -0700)]
in which hir::Visibility recalls whence it came (i.e., becomes Spanned)

There are at least a couple (and plausibly even three) diagnostics that
could use the spans of visibility modifiers in order to be reliably
correct (rather than hacking and munging surrounding spans to try to
infer where the visibility keyword must have been).

We follow the naming convention established by the other `Spanned` HIR
nodes: the "outer" type alias gets the "prime" node-type name, the
"inner" enum gets the name suffixed with an underscore, and the variant
names are prefixed with the prime name and `pub use` exported from here
(from HIR).

Thanks to veteran reviewer Vadim Petrochenkov for suggesting this
uniform approach. (A previous draft, based on the reasoning that
`Visibility::Inherited` should not have a span, tried to hack in a named
`span` field on `Visibility::Restricted` and a positional field on
`Public` and `Crate`. This was ... not so uniform.)

6 years agochoose a less arbitrary span when parsing the empty visibility modifier
Zack M. Davis [Sun, 1 Jul 2018 03:22:19 +0000 (20:22 -0700)]
choose a less arbitrary span when parsing the empty visibility modifier

Visibility spans were added to the AST in #47799 (d6bdf296) as a
`Spanned<_>`—which means that we need to choose a span even in the case
of inherited visibility (what you get when there's no `pub` &c. keyword
at all). That initial implementation's choice is pretty
counterintuitive, which could matter if we want to use it as a site to
suggest inserting a visibility modifier, &c.

(The phrase "Schelling span" in the comment is meant in analogy to the
game-theoretic concept of a "Schelling point", a value that is chosen
simply because it's what one can expect to agree upon with other agents
in the absence of explicit coördination.)

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 agoadd label to unknown meta item error
Andy Russell [Sat, 30 Jun 2018 19:33:59 +0000 (15:33 -0400)]
add label to unknown meta item error

6 years agoModified expected error messages in accordance with rebase.
Alexander Regueiro [Sun, 1 Jul 2018 01:26:31 +0000 (02:26 +0100)]
Modified expected error messages in accordance with rebase.

6 years agomove deprecation-sanity test to ui
Andy Russell [Sat, 30 Jun 2018 17:02:58 +0000 (13:02 -0400)]
move deprecation-sanity test to ui

6 years agofactor built-in attribute parsing into submodule
Andy Russell [Sat, 30 Jun 2018 16:19:18 +0000 (12:19 -0400)]
factor built-in attribute parsing into submodule

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 agoAlso run the bootstrap in bootstrap mode
Oliver Schneider [Sat, 30 Jun 2018 23:50:12 +0000 (01:50 +0200)]
Also run the bootstrap in bootstrap mode

6 years agoDid you mean to block nightlies on clippy?
Oliver Schneider [Mon, 28 May 2018 11:34:29 +0000 (13:34 +0200)]
Did you mean to block nightlies on clippy?

6 years agoMinor refactoring.
Alexander Regueiro [Sun, 24 Jun 2018 23:08:36 +0000 (00:08 +0100)]
Minor refactoring.

6 years agoAdded incremental test for interlinking static references.
Alexander Regueiro [Mon, 4 Jun 2018 22:48:00 +0000 (23:48 +0100)]
Added incremental test for interlinking static references.

6 years agoAdded tests fo referring to statics by value in other statics.
Alexander Regueiro [Mon, 4 Jun 2018 17:38:59 +0000 (18:38 +0100)]
Added tests fo referring to statics by value in other statics.

6 years agoAdded tests for writing to static mut's in statics.
Alexander Regueiro [Sun, 3 Jun 2018 18:47:19 +0000 (19:47 +0100)]
Added tests for writing to static mut's in statics.

6 years agoFixed bug with miri const evaluation where allocation is recursively borrowed.
Alexander Regueiro [Wed, 30 May 2018 18:27:45 +0000 (19:27 +0100)]
Fixed bug with miri const evaluation where allocation is recursively borrowed.

6 years agoAdded miri error for evaluating foreign statics.
Alexander Regueiro [Tue, 29 May 2018 00:38:18 +0000 (01:38 +0100)]
Added miri error for evaluating foreign statics.

Updated tests accordingly.

6 years agoLoosened rules involving statics mentioning other statics.
Alexander Regueiro [Sun, 27 May 2018 16:07:23 +0000 (17:07 +0100)]
Loosened rules involving statics mentioning other statics.

Updated tests accordingly.

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 agomore s/llvm-tools/llvm-tools-preview/
Jorge Aparicio [Sat, 30 Jun 2018 19:40:36 +0000 (14:40 -0500)]
more s/llvm-tools/llvm-tools-preview/

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 agoreduce search-index size
Guillaume Gomez [Sat, 16 Jun 2018 18:44:55 +0000 (20:44 +0200)]
reduce search-index size

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 agoImprove error messages when assigning to a local that starts initialized
Matthew Jasper [Sat, 30 Jun 2018 10:02:38 +0000 (11:02 +0100)]
Improve error messages when assigning to a local that starts initialized

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 agoin which we plug the crack where `?`-desugaring leaked into errors
Zack M. Davis [Sat, 30 Jun 2018 05:02:52 +0000 (22:02 -0700)]
in which we plug the crack where `?`-desugaring leaked into errors

Most of the time, it's not a problem that the types of the arm bodies in
a desugared-from-`?` match are different (that is, specifically: in `x?`
where x is a `Result<A, B>`, the `Ok` arm body is an `A`, whereas the
`Err` arm diverges to return a `Result<A, B>`), because they're being
assigned to different places. But in tail position, the types do need to
match, and our error message was explicitly referring to "match arms",
which is confusing when there's no `match` in the sweetly sugared
source.

It is not without some misgivings that we pollute the clarity-of-purpose
of `note_error_origin` with the suggestion to wrap with `Ok` (the other
branches are pointing out the odd-arm-out in the HIR that is the origin
of the error; the new branch that issues the `Ok` suggestion is serving
a different purpose), but it's the natural place to do it given that
we're already matching on `ObligationCauseCode::MatchExpressionArm {
arm_span, source }` there.

Resolves #51632.