]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoDon't keep the possibly init flow around longer than needed
Matthew Jasper [Sun, 22 Jul 2018 10:02:59 +0000 (11:02 +0100)]
Don't keep the possibly init flow around longer than needed

6 years agoAuto merge of #52250 - nnethercote:no-SparseBitMatrix, r=nikomatsakis
bors [Sun, 22 Jul 2018 02:43:57 +0000 (02:43 +0000)]
Auto merge of #52250 - nnethercote:no-SparseBitMatrix, r=nikomatsakis

Speed up `SparseBitMatrix` use in `RegionValues`.

In practice, these matrices range from 10% to 90%+ full once they are
filled in, so the dense representation is better.

This reduces the runtime of Check Nll builds of `inflate` by 32%, and
several other benchmarks by 1--5%.

It also increases max-rss of `clap-rs` by 30% and a couple of others by
up to 5%, while decreasing max-rss of `coercions` by 14%. I think the
speed-ups justify the max-rss increases.

r? @nikomatsakis

6 years agoAuto merge of #51485 - estebank:dehighlight-secondary-msgs, r=GuillaumeGomez
bors [Sat, 21 Jul 2018 23:50:28 +0000 (23:50 +0000)]
Auto merge of #51485 - estebank:dehighlight-secondary-msgs, r=GuillaumeGomez

Remove highlighting from secondary messages

Deemphasize the secondary messages so that all other highlights stand
out more.

<img width="684" alt="" src="https://user-images.githubusercontent.com/1606434/41261199-7b4fe96e-6d8f-11e8-8619-04d170617df2.png">

6 years agoAuto merge of #52115 - Dylan-DPC:feature/nll-liveness-regions, r=nikomatsakis
bors [Sat, 21 Jul 2018 21:01:17 +0000 (21:01 +0000)]
Auto merge of #52115 - Dylan-DPC:feature/nll-liveness-regions, r=nikomatsakis

only compute liveness for variables whose types include regions

Closes #52034

r? @nikomatsakis

6 years agoAuto merge of #51959 - tmandry:make-implied-outlives-query, r=nikomatsakis
bors [Sat, 21 Jul 2018 18:51:13 +0000 (18:51 +0000)]
Auto merge of #51959 - tmandry:make-implied-outlives-query, r=nikomatsakis

Turn implied_outlives_bounds into a query

Right now all this does is remove the error reporting in `implied_outlives_bounds`, which seems to work. Farming out full tests to Travis.

For #51649. That issue is deferred so not sure what's next.

r? @nikomatsakis

6 years agoAuto merge of #52405 - matthewjasper:mutability-errors, r=pnkfelix
bors [Sat, 21 Jul 2018 14:37:45 +0000 (14:37 +0000)]
Auto merge of #52405 - matthewjasper:mutability-errors, r=pnkfelix

[NLL] Mutability errors

cc #51028
cc #51170
cc #46559
Closes #46629

* Better explain why the place is immutable ("immutable item" is gone)
* Distinguish &T and *const T
* Use better spans when a mutable borrow is for a closure capture

r? @pnkfelix

6 years agodelete tests
dylan_DPC [Sat, 21 Jul 2018 14:16:41 +0000 (19:46 +0530)]
delete tests

6 years agowe now get 2 extra mismatched type errors
Niko Matsakis [Thu, 19 Jul 2018 04:10:35 +0000 (00:10 -0400)]
we now get 2 extra mismatched type errors

These new errors actually seem a *tad* clearer than the old one, so
that's good, but now there are 3. Maybe call it a wash?

6 years agouse proper body-id and span when solving obligations
Niko Matsakis [Wed, 18 Jul 2018 19:24:00 +0000 (15:24 -0400)]
use proper body-id and span when solving obligations

6 years agoadd regression test for #52078
Niko Matsakis [Wed, 18 Jul 2018 18:59:36 +0000 (14:59 -0400)]
add regression test for #52078

Fixes #52078

6 years agoskip no-op obligations and add a little debug output
Niko Matsakis [Wed, 18 Jul 2018 15:05:07 +0000 (11:05 -0400)]
skip no-op obligations and add a little debug output

6 years agoConvert implied_outlives_bounds to a query
Tyler Mandry [Wed, 4 Jul 2018 18:07:45 +0000 (13:07 -0500)]
Convert implied_outlives_bounds to a query

6 years agoAuto merge of #52562 - Manishearth:clippyup, r=RalfJung
bors [Sat, 21 Jul 2018 12:32:17 +0000 (12:32 +0000)]
Auto merge of #52562 - Manishearth:clippyup, r=RalfJung

Update clippy

r? @kennytm @oli-obk

6 years agoadd docs
dylan_DPC [Sat, 21 Jul 2018 11:51:04 +0000 (17:21 +0530)]
add docs

6 years agoDon't invent new magic keywords
Oliver Schneider [Sat, 21 Jul 2018 10:36:18 +0000 (12:36 +0200)]
Don't invent new magic keywords

6 years agoAuto merge of #52555 - petrochenkov:mresfact, r=alexcrichton
bors [Sat, 21 Jul 2018 10:30:11 +0000 (10:30 +0000)]
Auto merge of #52555 - petrochenkov:mresfact, r=alexcrichton

resolve: Some renaming, refactoring and comments

Commits are self-descriptive.
The only functional change is https://github.com/rust-lang/rust/commit/34bf2f572e33d4df1459413b5014ca98fc9fa4e0 that tightens shadowing rules for macro paths (makes the second and third cases in `test/ui/imports/glob-shadowing.rs` an error).

6 years agoAuto merge of #52552 - eddyb:proc-macro-prep, r=alexcrichton
bors [Sat, 21 Jul 2018 08:31:32 +0000 (08:31 +0000)]
Auto merge of #52552 - eddyb:proc-macro-prep, r=alexcrichton

Prepare proc_macro for decoupling it from the rest of the compiler.

This is #49219 up to the point where the bridge is introduced. Aside from moving some code around, the largest change is the rewrite of `proc_macro::quote` to be simpler and do less introspection.

I'd like to also extend `quote!` with `${stmt;...;expr}` instead of just `$variable` (and maybe even `$(... $iter ...)*`), which seems pretty straight-forward now, but I don't know if/when I should.

r? @alexcrichton or @dtolnay cc @jseyfried @petrochenkov

6 years agoAuto merge of #52535 - alexcrichton:update-stdsimd, r=Mark-Simulacrum
bors [Sat, 21 Jul 2018 06:26:18 +0000 (06:26 +0000)]
Auto merge of #52535 - alexcrichton:update-stdsimd, r=Mark-Simulacrum

Update stdsimd to undo an accidental stabilization

Closes #52403

6 years agoremove unwanted tests and a reference to it in comments
dylan_DPC [Sat, 21 Jul 2018 06:12:44 +0000 (11:42 +0530)]
remove unwanted tests and a reference to it in comments

6 years agoUpdate stdsimd to undo an accidental stabilization
Alex Crichton [Thu, 19 Jul 2018 14:01:37 +0000 (07:01 -0700)]
Update stdsimd to undo an accidental stabilization

Closes #52403

6 years agoAuto merge of #52536 - alexcrichton:attr-spans, r=nikomatsakis
bors [Sat, 21 Jul 2018 04:19:15 +0000 (04:19 +0000)]
Auto merge of #52536 - alexcrichton:attr-spans, r=nikomatsakis

proc_macro: Preserve spans of attributes on functions

This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from #43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes #47941

6 years agoAuto merge of #52438 - ljedrz:rustc_vec_capacity, r=eddyb
bors [Sat, 21 Jul 2018 00:55:46 +0000 (00:55 +0000)]
Auto merge of #52438 - ljedrz:rustc_vec_capacity, r=eddyb

Calculate Vec capacities in librustc

Calculate the required capacity of a few vectors in rustc based on the number of elements they are populated with.

6 years agoAuto merge of #52574 - kennytm:rollup, r=kennytm
bors [Fri, 20 Jul 2018 22:52:11 +0000 (22:52 +0000)]
Auto merge of #52574 - kennytm:rollup, r=kennytm

Rollup of 7 pull requests

Successful merges:

 - #52502 (fix unsafety: don't call ptr_rotate for ZST)
 - #52505 (rustc: Remove a workaround in ThinLTO fixed upstream)
 - #52526 (Enable run-pass/sepcomp-lib-lto.rs on Android)
 - #52527 (Remove duplicate E0396 tests)
 - #52539 (rustc: Fix two custom attributes with custom derive)
 - #52540 (Fix docker/run.sh script when run locally)
 - #52573 (Cleanups)

Failed merges:

r? @ghost

6 years agoClippy opts out of in_external_macro
Oliver Schneider [Fri, 20 Jul 2018 20:50:32 +0000 (22:50 +0200)]
Clippy opts out of in_external_macro

6 years agoAllow individual lints to opt into being reported in external macros
Oliver Schneider [Fri, 20 Jul 2018 20:45:52 +0000 (22:45 +0200)]
Allow individual lints to opt into being reported in external macros

6 years agoRollup merge of #52573 - oli-obk:cleanups, r=RalfJung
kennytm [Fri, 20 Jul 2018 18:59:13 +0000 (02:59 +0800)]
Rollup merge of #52573 - oli-obk:cleanups, r=RalfJung

Cleanups

r? @RalfJung

6 years agoRollup merge of #52540 - alexcrichton:tweak-script, r=kennytm
kennytm [Fri, 20 Jul 2018 18:59:10 +0000 (02:59 +0800)]
Rollup merge of #52540 - alexcrichton:tweak-script, r=kennytm

Fix docker/run.sh script when run locally

Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.

6 years agoRollup merge of #52539 - alexcrichton:two-attrs, r=petrochenkov
kennytm [Fri, 20 Jul 2018 18:59:09 +0000 (02:59 +0800)]
Rollup merge of #52539 - alexcrichton:two-attrs, r=petrochenkov

rustc: Fix two custom attributes with custom derive

This commit fixes an issue where multiple custom attributes could not be fed
into a custom derive in some situations with the `use_extern_macros` feature
enabled. The problem was that the macro expander didn't consider that it was
making progress when we were deducing that attributes should be lumped in with
custom derive invocations.

The fix applied here was to track in the expander if our attribute is changing
(getting stashed away elsewhere and replaced with a new invocation). If it is
swapped then it's considered progress, otherwise behavior should remain the
same.

Closes #52525

6 years agoRollup merge of #52527 - ljedrz:cleanup_13973, r=oli-obk
kennytm [Fri, 20 Jul 2018 18:59:08 +0000 (02:59 +0800)]
Rollup merge of #52527 - ljedrz:cleanup_13973, r=oli-obk

Remove duplicate E0396 tests

Resolves FIXME #13973 (erroneously marked as #13972). A test for E0396 already exists in `test/ui/const-deref-ptr.rs`.

6 years agoRollup merge of #52526 - ljedrz:cleanup_18800, r=alexcrichton
kennytm [Fri, 20 Jul 2018 18:59:06 +0000 (02:59 +0800)]
Rollup merge of #52526 - ljedrz:cleanup_18800, r=alexcrichton

Enable run-pass/sepcomp-lib-lto.rs on Android

#18800 is fixed, so it should be safe to restore this test.

6 years agoRollup merge of #52505 - alexcrichton:remove-thinlto-hack, r=nikomatsakis
kennytm [Fri, 20 Jul 2018 18:59:05 +0000 (02:59 +0800)]
Rollup merge of #52505 - alexcrichton:remove-thinlto-hack, r=nikomatsakis

rustc: Remove a workaround in ThinLTO fixed upstream

This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736

6 years agoRollup merge of #52502 - RalfJung:rotate, r=scottmcm
kennytm [Fri, 20 Jul 2018 18:59:04 +0000 (02:59 +0800)]
Rollup merge of #52502 - RalfJung:rotate, r=scottmcm

fix unsafety: don't call ptr_rotate for ZST

`rotate::ptr_rotate` has a comment saying
```
/// # Safety
///
/// The specified range must be valid for reading and writing.
/// The type `T` must have non-zero size.
```
So we better make sure we don't call it on ZST...

Cc @scottmcm (author of https://github.com/rust-lang/rust/pull/41670)

6 years agoRefactor a few push loops to iterators in librustc
ljedrz [Mon, 16 Jul 2018 17:35:45 +0000 (19:35 +0200)]
Refactor a few push loops to iterators in librustc

6 years agoUpdate tests for new NLL mutability errors
Matthew Jasper [Tue, 17 Jul 2018 19:29:48 +0000 (20:29 +0100)]
Update tests for new NLL mutability errors

6 years agoImprove NLL mutability errors
Matthew Jasper [Sun, 15 Jul 2018 14:51:35 +0000 (15:51 +0100)]
Improve NLL mutability errors

* Better explain why the place is immutable
* Distinguish &T and *const T
* Use better spans when a mutable borrow is for a closure capture

6 years agoMove mutability error reporting to its own file
Matthew Jasper [Sun, 15 Jul 2018 14:11:29 +0000 (15:11 +0100)]
Move mutability error reporting to its own file

6 years agoMIR changes to improve NLL cannot mutate errors
Matthew Jasper [Sun, 15 Jul 2018 14:00:58 +0000 (15:00 +0100)]
MIR changes to improve NLL cannot mutate errors

Alway use unique instead of mutable borrows immutable upvars.
Mark variables that are references for a match guard

6 years agoUpdate clippy
Manish Goregaokar [Fri, 20 Jul 2018 07:53:56 +0000 (00:53 -0700)]
Update clippy

6 years agoAuto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomez
bors [Fri, 20 Jul 2018 18:02:05 +0000 (18:02 +0000)]
Auto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomez

stabilize lint handling in rustdoc

When https://github.com/rust-lang/rust/pull/51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period.

Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them.

r? @rust-lang/rustdoc

6 years agoRemove unused method
Oliver Schneider [Fri, 20 Jul 2018 16:42:45 +0000 (18:42 +0200)]
Remove unused method

6 years agoOnly methods are fn-like, not other associated items
Oliver Schneider [Fri, 20 Jul 2018 15:19:58 +0000 (17:19 +0200)]
Only methods are fn-like, not other associated items

6 years agoAuto merge of #52498 - oli-obk:const_prop, r=nikomatsakis
bors [Fri, 20 Jul 2018 13:22:36 +0000 (13:22 +0000)]
Auto merge of #52498 - oli-obk:const_prop, r=nikomatsakis

Const propagate casts

fixes #49760

So... This fixes the original issue about the missing warnings.

But our test suite contains fun things like

```rust
fn foo() {}
assert_eq!(foo as i16, foo as usize as i16);
```

Which, will result in

> a raw memory access tried to access part of a pointer value as raw bytes

on both sides of the assertion. Because well... that's exactly what's going on! We're ripping out 16 bits of a pointer.

6 years agotidy up
dylan_DPC [Fri, 20 Jul 2018 13:10:52 +0000 (18:40 +0530)]
tidy up

6 years agomove NllLivenessMap and LocalWithRegion to liveness_map
dylan_DPC [Fri, 20 Jul 2018 12:00:03 +0000 (17:30 +0530)]
move NllLivenessMap and LocalWithRegion to liveness_map

6 years agoAuto merge of #52476 - wesleywiser:categorize_queries, r=nikomatsakis
bors [Fri, 20 Jul 2018 11:10:58 +0000 (11:10 +0000)]
Auto merge of #52476 - wesleywiser:categorize_queries, r=nikomatsakis

Categorize queries for later self-profiling

Change the define_queries! macro per feedback on #51657.

Big thanks to @mark-i-m for the help getting the macro changes correct!

I'm pulling this commit out of the other PR because it's hard to keep up-to-date as queries are added or changed.

r? @nikomatsakis

6 years agoRevert some use of `PtrKey` to fix parallel_queries build
Vadim Petrochenkov [Fri, 20 Jul 2018 09:45:07 +0000 (12:45 +0300)]
Revert some use of `PtrKey` to fix parallel_queries build

6 years agoresolve: Add more comments to in-module resolution
Vadim Petrochenkov [Thu, 19 Jul 2018 22:45:08 +0000 (01:45 +0300)]
resolve: Add more comments to in-module resolution

6 years agoresolve: Fully prohibit shadowing of in-scope names by globs in macro paths
Vadim Petrochenkov [Thu, 19 Jul 2018 22:11:30 +0000 (01:11 +0300)]
resolve: Fully prohibit shadowing of in-scope names by globs in macro paths

6 years agodata_structures: Add a reference wrapper for pointer-indexed maps/sets
Vadim Petrochenkov [Wed, 18 Jul 2018 18:53:54 +0000 (21:53 +0300)]
data_structures: Add a reference wrapper for pointer-indexed maps/sets

Use `ptr::eq` for comparing pointers

6 years agoresolve: Add some comments to in-module resolution
Vadim Petrochenkov [Wed, 18 Jul 2018 00:08:49 +0000 (03:08 +0300)]
resolve: Add some comments to in-module resolution

6 years agoresolve: Remove `SingleImports` in favor of a simple set
Vadim Petrochenkov [Tue, 17 Jul 2018 01:12:48 +0000 (04:12 +0300)]
resolve: Remove `SingleImports` in favor of a simple set

6 years agoresolve: Rename `global_macros` to `macro_prelude`
Vadim Petrochenkov [Mon, 16 Jul 2018 18:36:13 +0000 (21:36 +0300)]
resolve: Rename `global_macros` to `macro_prelude`

Rename `shadows_glob` to `shadowed_glob`

6 years agoresolve: Remove unused parameter from `resolve_ident_in_module`
Vadim Petrochenkov [Mon, 16 Jul 2018 18:25:52 +0000 (21:25 +0300)]
resolve: Remove unused parameter from `resolve_ident_in_module`

6 years agoAuto merge of #52467 - alexcrichton:lints-and-macros, r=Manishearth
bors [Fri, 20 Jul 2018 08:54:14 +0000 (08:54 +0000)]
Auto merge of #52467 - alexcrichton:lints-and-macros, r=Manishearth

Squash all lints tied to foreign macros by default

This PR is a continuation of https://github.com/rust-lang/rust/pull/49755 (thanks for the initial jump-start @Dylan-DPC!) and is targeted at solving https://github.com/rust-lang/rust/issues/48855. This change updates the lint infrastructure to, by default, ignore all lints emitted for code that originates in a foreign macro. For example if `println!("...")` injects some idiomatic warnings these are all ignored by default. The rationale here is that for almost all lints there's no action that can be taken if the code originates from a foreign lint.

Closes #48855
Closes #52483
Closes #52479

6 years agoRemove duplicate E0396 tests
ljedrz [Thu, 19 Jul 2018 08:28:25 +0000 (10:28 +0200)]
Remove duplicate E0396 tests

6 years agoAuto merge of #52445 - alexcrichton:wasm-import-module, r=eddyb
bors [Fri, 20 Jul 2018 06:40:10 +0000 (06:40 +0000)]
Auto merge of #52445 - alexcrichton:wasm-import-module, r=eddyb

rustc: Stabilize #[wasm_import_module] as #[link(...)]

This commit stabilizes the `#[wasm_import_module]` attribute as
`#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in
the `#[link]` attribute is used to configured the module name that the imports
are listed with. The WebAssembly specification indicates two utf-8 names are
associated with all imported items, one for the module the item comes from and
one for the item itself. The item itself is configurable in Rust via its
identifier or `#[link_name = "..."]`, but the module name was previously not
configurable and defaulted to `"env"`. This commit ensures that this is also
configurable.

Closes #52090

6 years agoSpeed up `SparseBitMatrix`.
Nicholas Nethercote [Wed, 18 Jul 2018 05:03:43 +0000 (15:03 +1000)]
Speed up `SparseBitMatrix`.

Using a `BTreeMap` to represent rows in the bit matrix is really slow.
This patch changes things so that each row is represented by a
`BitVector`. This is a less sparse representation, but a much faster
one.

As a result, `SparseBitSet` and `SparseChunk` can be removed.

Other minor changes in this patch.

- It renames `BitVector::insert()` as `merge()`, which matches the
  terminology in the other classes in bitvec.rs.

- It removes `SparseBitMatrix::is_subset()`, which is unused.

- It reinstates `RegionValueElements::num_elements()`, which #52190 had
  removed.

- It removes a low-value `debug!` call in `SparseBitMatrix::add()`.

6 years agoalways get number of live variables from the map
Niko Matsakis [Fri, 20 Jul 2018 04:46:06 +0000 (00:46 -0400)]
always get number of live variables from the map

6 years agoproc_macro: avoid exposing internal details in formatting impls.
Eduard-Mihai Burtescu [Thu, 19 Jul 2018 21:09:05 +0000 (00:09 +0300)]
proc_macro: avoid exposing internal details in formatting impls.

6 years agoproc_macro: move some implementation details to a rustc module.
Eduard-Mihai Burtescu [Thu, 19 Jul 2018 12:59:08 +0000 (15:59 +0300)]
proc_macro: move some implementation details to a rustc module.

6 years agoAuto merge of #52349 - RalfJung:once, r=alexcrichton
bors [Fri, 20 Jul 2018 02:52:19 +0000 (02:52 +0000)]
Auto merge of #52349 - RalfJung:once, r=alexcrichton

sync::Once use release-acquire access modes

Nothing here makes a case distinction like "this happened before OR after that". All we need is to get happens-before edges whenever we see that the state/signal has been changed. Release-acquire is good enough for that.

6 years agoproc_macro: don't expose compiler-internal FileName in public API.
Eduard-Mihai Burtescu [Fri, 16 Mar 2018 15:04:14 +0000 (17:04 +0200)]
proc_macro: don't expose compiler-internal FileName in public API.

6 years agoproc_macro: clean up the implementation of quasi-quoting.
Eduard-Mihai Burtescu [Sun, 22 Apr 2018 00:05:02 +0000 (03:05 +0300)]
proc_macro: clean up the implementation of quasi-quoting.

6 years agoproc_macro: don't try to reflect literals in quasi-quoting.
Eduard-Mihai Burtescu [Sat, 21 Apr 2018 19:16:55 +0000 (22:16 +0300)]
proc_macro: don't try to reflect literals in quasi-quoting.

6 years agoproc_macro: don't use DiagnosticBuilder for building up Diagnostics.
Eduard-Mihai Burtescu [Sat, 21 Apr 2018 18:33:20 +0000 (21:33 +0300)]
proc_macro: don't use DiagnosticBuilder for building up Diagnostics.

6 years agoAuto merge of #52024 - oli-obk:existential_parse, r=nikomatsakis
bors [Thu, 19 Jul 2018 21:14:01 +0000 (21:14 +0000)]
Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakis

Implement existential types

(not for associated types yet)

r? @nikomatsakis

cc @Centril @varkor @alexreg

6 years agoAuto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavus
bors [Thu, 19 Jul 2018 19:03:03 +0000 (19:03 +0000)]
Auto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavus

RFC 2008 non-exhaustive enums/structs: Rustdoc

Part of #44109. Not sure how those who maintain rustdoc primarily would prefer this addition look or where it should be placed, happy to make any changes required.

r? @QuietMisdreavus (not sure if this is the right person, just guessing)

6 years agotidy fixes
dylan_DPC [Thu, 19 Jul 2018 18:52:57 +0000 (00:22 +0530)]
tidy fixes

6 years agoleft out one field during merge
dylan_DPC [Thu, 19 Jul 2018 18:06:26 +0000 (23:36 +0530)]
left out one field during merge

6 years agoconvert LocalWithRegion to Local
dylan_DPC [Thu, 19 Jul 2018 17:18:06 +0000 (22:48 +0530)]
convert LocalWithRegion to Local

6 years agomir/mod.rs / visit.rs reverted back to using Local
dylan_DPC [Wed, 18 Jul 2018 18:44:32 +0000 (00:14 +0530)]
mir/mod.rs / visit.rs reverted back to using Local

6 years agoadd LocalWithRegion NllLivenessMap
dylan_DPC [Wed, 18 Jul 2018 17:01:04 +0000 (22:31 +0530)]
add LocalWithRegion NllLivenessMap

6 years agomake liveness generic over set of local variables
Niko Matsakis [Sun, 15 Jul 2018 04:28:26 +0000 (00:28 -0400)]
make liveness generic over set of local variables

We used to hardcode that we wanted the liveness of *all* variables.
This can now be configured by selecting an alternative index type
V and providing a (partial) map from locals to that new type V.

6 years agogeneric shuffle continues
dylan_DPC [Fri, 13 Jul 2018 11:10:24 +0000 (16:40 +0530)]
generic shuffle continues

6 years agouse LiveVariableMap as trait bound
dylan_DPC [Sun, 8 Jul 2018 13:44:36 +0000 (19:14 +0530)]
use LiveVariableMap as trait bound

6 years agoadd trait structs and other changes from V to local
dylan_DPC [Sat, 7 Jul 2018 20:44:57 +0000 (02:14 +0530)]
add trait structs and other changes from V to local

6 years agoadd generic parameter
dylan_DPC [Fri, 6 Jul 2018 15:27:01 +0000 (20:57 +0530)]
add generic parameter

6 years agoGenerate a page for existential types
Oliver Schneider [Thu, 19 Jul 2018 08:23:56 +0000 (10:23 +0200)]
Generate a page for existential types

6 years agoUpdated FRU terminology.
David Wood [Thu, 19 Jul 2018 16:03:17 +0000 (17:03 +0100)]
Updated FRU terminology.

6 years agoFix docker/run.sh script when run locally
Alex Crichton [Thu, 19 Jul 2018 14:48:17 +0000 (07:48 -0700)]
Fix docker/run.sh script when run locally

Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.

6 years agorustc: Fix two custom attributes with custom derive
Alex Crichton [Thu, 19 Jul 2018 14:43:58 +0000 (07:43 -0700)]
rustc: Fix two custom attributes with custom derive

This commit fixes an issue where multiple custom attributes could not be fed
into a custom derive in some situations with the `use_extern_macros` feature
enabled. The problem was that the macro expander didn't consider that it was
making progress when we were deducing that attributes should be lumped in with
custom derive invocations.

The fix applied here was to track in the expander if our attribute is changing
(getting stashed away elsewhere and replaced with a new invocation). If it is
swapped then it's considered progress, otherwise behavior should remain the
same.

Closes #52525

6 years agoproc_macro: Preserve spans of attributes on functions
Alex Crichton [Thu, 19 Jul 2018 14:06:31 +0000 (07:06 -0700)]
proc_macro: Preserve spans of attributes on functions

This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from #43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes #47941

6 years agoAuto merge of #52197 - euclio:exit-code, r=oli-obk
bors [Thu, 19 Jul 2018 13:46:15 +0000 (13:46 +0000)]
Auto merge of #52197 - euclio:exit-code, r=oli-obk

overhaul exit codes for rustc and rustdoc

This commit changes the exit status of rustc to 1 in the presence of
compilation errors. In the event of an unexpected panic (ICE) the
standard panic error exit status of 101 remains.

A run-make test is added to ensure that the exit code does not regress,
and compiletest is updated to check for an exit status of 1 or 101,
depending on the mode and suite.

This is a breaking change for custom drivers.

Note that while changes were made to the rustdoc binary, there is no
intended behavior change. rustdoc errors (i.e., failed lints) will still
report 101. While this could *also* hide potential ICEs, I will leave
that work to a future PR.

Fixes #51971.

6 years agoAuto merge of #52515 - Manishearth:clippyup, r=kennytm
bors [Thu, 19 Jul 2018 09:55:17 +0000 (09:55 +0000)]
Auto merge of #52515 - Manishearth:clippyup, r=kennytm

Update clippy

Silences the warnings for now, will fix those over time.

6 years agoEnable run-pass/sepcomp-lib-lto.rs on Android
ljedrz [Thu, 19 Jul 2018 08:11:55 +0000 (10:11 +0200)]
Enable run-pass/sepcomp-lib-lto.rs on Android

6 years agofix safety-related comment in slice::rotate
Ralf Jung [Thu, 19 Jul 2018 07:11:56 +0000 (09:11 +0200)]
fix safety-related comment in slice::rotate

6 years agoUpdate clippy
Manish Goregaokar [Thu, 19 Jul 2018 03:25:11 +0000 (20:25 -0700)]
Update clippy

6 years agoAuto merge of #52429 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Thu, 19 Jul 2018 03:05:05 +0000 (03:05 +0000)]
Auto merge of #52429 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update Cargo and stdsimd submodules

Update Cargo to bring in some bug fixes and such, and update `stdsimd` to...

Closes #52403

6 years agoAuto merge of #52486 - kennytm:rollup, r=kennytm
bors [Thu, 19 Jul 2018 00:56:21 +0000 (00:56 +0000)]
Auto merge of #52486 - kennytm:rollup, r=kennytm

Rollup of 13 pull requests

Successful merges:

 - #51628 (use checked write in `LineWriter` example)
 - #52116 (Handle array manually in str case conversion methods)
 - #52218 (Amend option.take examples)
 - #52418 (Do not use desugared ident when suggesting adding a type)
 - #52439 (Revert some changes from #51917 to fix custom libdir)
 - #52455 (Fix doc comment: use `?` instead of `.unwrap()`)
 - #52458 (rustc: Fix a suggestion for the `proc_macro` feature)
 - #52464 (Allow clippy to be installed with make install)
 - #52472 (rustc: Enable `use_extern_macros` in 2018 edition)
 - #52477 (Clarify short-circuiting behvaior of Iterator::zip.)
 - #52480 (Cleanup #24958)
 - #52487 (Don't build twice the sanitizers on Linux)
 - #52510 (rustdoc: remove FIXME about macro redirects)

Failed merges:

r? @ghost

6 years agoUpdate Cargo submodule
Alex Crichton [Tue, 17 Jul 2018 16:04:22 +0000 (09:04 -0700)]
Update Cargo submodule

6 years agoAuto merge of #52431 - semarie:compiler-builtins, r=alexcrichton
bors [Wed, 18 Jul 2018 22:15:46 +0000 (22:15 +0000)]
Auto merge of #52431 - semarie:compiler-builtins, r=alexcrichton

update compiler-builtins for openbsd

import rust-lang-nursery/compiler-builtins/pull/249 in rust main line.

it solves an issue on OpenBSD with building of `librsvg`.

6 years agoRollup merge of #52510 - QuietMisdreavus:redirects-are-cool, r=nrc
kennytm [Wed, 18 Jul 2018 21:46:10 +0000 (05:46 +0800)]
Rollup merge of #52510 - QuietMisdreavus:redirects-are-cool, r=nrc

rustdoc: remove FIXME about macro redirects

Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay.

Closes #35705

6 years agoRollup merge of #52418 - estebank:desugaring-type, r=nikomatsakis
kennytm [Wed, 18 Jul 2018 21:45:16 +0000 (05:45 +0800)]
Rollup merge of #52418 - estebank:desugaring-type, r=nikomatsakis

Do not use desugared ident when suggesting adding a type

Re #51116.

6 years agoremove FIXME about macro redirects
QuietMisdreavus [Wed, 18 Jul 2018 20:41:13 +0000 (15:41 -0500)]
remove FIXME about macro redirects

Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay.

Closes #35705

6 years agoUpdated wording and placement of non-exhaustive notice so it is collapsed by default...
David Wood [Wed, 18 Jul 2018 19:27:25 +0000 (20:27 +0100)]
Updated wording and placement of non-exhaustive notice so it is collapsed by default and easier to understand.

6 years agorustc: Remove a workaroudn in ThinLTO fixed upstream
Alex Crichton [Wed, 18 Jul 2018 18:37:56 +0000 (11:37 -0700)]
rustc: Remove a workaroudn in ThinLTO fixed upstream

This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736

6 years agoupdate compiler-builtins for openbsd
Sébastien Marie [Mon, 16 Jul 2018 14:26:43 +0000 (16:26 +0200)]
update compiler-builtins for openbsd

6 years agoUpdate test output
Esteban Küber [Wed, 18 Jul 2018 17:04:10 +0000 (10:04 -0700)]
Update test output

6 years agoChange label span to point at iterator instead of iter item
Esteban Küber [Mon, 16 Jul 2018 21:05:42 +0000 (14:05 -0700)]
Change label span to point at iterator instead of iter item

6 years agoDo not use desugared ident when suggesting adding a type
Esteban Küber [Mon, 16 Jul 2018 03:52:41 +0000 (20:52 -0700)]
Do not use desugared ident when suggesting adding a type