Commit Graph

95388 Commits

Author SHA1 Message Date
Oliver Scherer
870a6dc230 Don't ICE when pattern matching packed structs 2019-06-19 09:52:35 +02:00
Oliver Scherer
21b1bd69b0 Prevent cyclic locks of alloc_map 2019-06-19 09:52:35 +02:00
Oliver Scherer
4b6f3868b3 Make interning explicitly care about types and the mutability of memory 2019-06-19 09:52:35 +02:00
Oliver Scherer
8d5728a7c8 Fixmes and style fixes 2019-06-19 09:52:35 +02:00
Oliver Scherer
8b21b075f7 Add functions to build raw slices 2019-06-19 09:21:44 +02:00
bors
a6cbf2d134 Auto merge of #61945 - Centril:rollup-xdqo2mn, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #61505 (Only show methods that appear in `impl` blocks in the Implementors sections of trait doc pages)
 - #61701 (move stray run-pass const tests into const/ folder)
 - #61748 (Tweak transparent enums and unions diagnostic spans)
 - #61802 (Make MaybeUninit #[repr(transparent)])
 - #61839 (ci: Add a script for generating CPU usage graphs)
 - #61842 (Remove unnecessary lift calls)
 - #61843 (Turn down the myriad-closures test)
 - #61896 (rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.)
 - #61898 (syntax: Factor out common fields from `SyntaxExtension` variants)
 - #61938 (create an issue for miri even in status test-fail)
 - #61941 (Preserve generator and yield source for error messages)

Failed merges:

r? @ghost
2019-06-19 06:49:13 +00:00
Esteban Küber
3dd3c6dcd8 Fix ICE involving mut references 2019-06-18 18:39:08 -07:00
Mazdak Farrokhzad
fde341a4ef
Rollup merge of #61941 - cramertj:no-more-yield-errors, r=centril
Preserve generator and yield source for error messages

Previously, error messages after HIR lowering all referred
to generators and yield, regardless of whether the original
source was a generator or an async/await body. This change
tracks the kind of each generator and yield source in order
to provide appropriately tailored error messages.

Fixes #60615.
2019-06-19 01:52:13 +02:00
Mazdak Farrokhzad
9b7b47cd57
Rollup merge of #61938 - RalfJung:miri-toolstate, r=kennytm
create an issue for miri even in status test-fail

I fired up python to see that this parses, but I wouldn't know how to test this script.
2019-06-19 01:52:12 +02:00
Mazdak Farrokhzad
d51002ce07
Rollup merge of #61898 - petrochenkov:sekind, r=eddyb
syntax: Factor out common fields from `SyntaxExtension` variants

And some other related cleanups.

Continuation of https://github.com/rust-lang/rust/pull/61606.
This will also help to unblock https://github.com/rust-lang/rust/pull/61877.
2019-06-19 01:52:10 +02:00
Mazdak Farrokhzad
dcd5b20177
Rollup merge of #61896 - eddyb:correct-self-ctor, r=petrochenkov
rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.

Fixes #61882.

r? @petrochenkov cc @varkor
2019-06-19 01:52:09 +02:00
Mazdak Farrokhzad
4f24715745
Rollup merge of #61843 - alexcrichton:disable-myriad-closures, r=pietroalbini
Turn down the myriad-closures test

This tests takes nearly 5 minutes to compile on CI where the CPUs we
have aren't exactly the fastest. This test does actually require all
closures to exist to exhibit the original bug, but it seems a little
excessive to test a single bug on CI on all platforms which simply pegs
a single CPU for 5 minutes with no parallelism opportunities, so this
turns down the test to still exercise it somewhat at least.
2019-06-19 01:52:07 +02:00
Mazdak Farrokhzad
de8066f73f
Rollup merge of #61842 - Zoxc:trim-lift, r=eddyb
Remove unnecessary lift calls

Note that some of these might be useful for sanity checking that there's no infer types or regions.

r? @eddyb
2019-06-19 01:52:06 +02:00
Mazdak Farrokhzad
404c854d03
Rollup merge of #61839 - alexcrichton:pr-and-master-builds, r=pietroalbini
ci: Add a script for generating CPU usage graphs

This commit checks in a script which generates CPU usage graphs over
time, expanding on the previous comment that was include in the
collection file.

Some example graphs from the [latest build](https://dev.azure.com/rust-lang/rust/_build/results?buildId=717) look like:

![dist-x86_64-apple](https://user-images.githubusercontent.com/64996/59520676-16c5b000-8e90-11e9-9188-27001911f270.png)

![x86_64-msvc-1](https://user-images.githubusercontent.com/64996/59520677-175e4680-8e90-11e9-8568-4b564807324e.png)

![x86_64-mingw-1](https://user-images.githubusercontent.com/64996/59520680-175e4680-8e90-11e9-939d-a73c7224582f.png)

![test-various](https://user-images.githubusercontent.com/64996/59520682-175e4680-8e90-11e9-9980-900ed4eeb8f4.png)
2019-06-19 01:52:04 +02:00
Mazdak Farrokhzad
e416932bab
Rollup merge of #61802 - mjbshaw:maybe-uninit-transparent, r=cramertj
Make MaybeUninit #[repr(transparent)]

Tracking issue: #60405
2019-06-19 01:52:03 +02:00
Mazdak Farrokhzad
06d2a891c7
Rollup merge of #61748 - estebank:transparent-span, r=Centril
Tweak transparent enums and unions diagnostic spans
2019-06-19 01:52:01 +02:00
Mazdak Farrokhzad
65da792afa
Rollup merge of #61701 - RalfJung:const-tests, r=cramertj
move stray run-pass const tests into const/ folder

r? @oli-obk
2019-06-19 01:51:59 +02:00
Mazdak Farrokhzad
9a7016d67d
Rollup merge of #61505 - ebarnard:doc-shrink, r=GuillaumeGomez
Only show methods that appear in `impl` blocks in the Implementors sections of trait doc pages

In the "Implementors" and "Implementations on Foreign Types" sections, only show methods that appear in the `impl` block for that type. This has the benefit of
- Reducing the size of the Iterator page, and other large trait documentation pages.
- Retaining documentation on the `impl` blocks and functions in the `impl` blocks.
- Indicating which provided methods are overridden.
- Making the documentation match the structure of the code being documented.
- Being a small change that can be easily backed out if issues arise.

A set of Rust stdlib docs build with this change are [available here](https://ebarnard.github.io/2019-06-03-rust-smaller-trait-implementers-docs/).

The size of the [`Iterator` doc page](https://ebarnard.github.io/2019-06-03-rust-smaller-trait-implementers-docs/std/iter/trait.Iterator.html) is reduced from 14.4MB (latest nightly) to 724kB.

Before:
<img width="1411" alt="Screenshot 2019-06-03 at 23 12 17" src="https://user-images.githubusercontent.com/1059683/58837971-1722a780-8655-11e9-8d81-51e48130951d.png">

After:
<img width="1428" alt="Screenshot 2019-06-03 at 16 41 27" src="https://user-images.githubusercontent.com/1059683/58814907-84ffac80-861e-11e9-8692-79be473a5299.png">

cc #55900
2019-06-19 01:51:58 +02:00
Taylor Cramer
d67db0042c Preserve generator and yield source for error messages
Previously, error messages after HIR lowering all referred
to generators and yield, regardless of whether the original
source was a generator or an async/await body. This change
tracks the kind of each generator and yield source in order
to provide appropriately tailored error messages.
2019-06-18 16:22:22 -07:00
Matthew Jasper
fdeb581513 Address review comments 2019-06-18 22:54:51 +01:00
Matthew Jasper
d5f80c8414 Improve the explicit_outlives_requirements lint
* Don't use Strings to compare parameters
* Extend the lint to lifetime bounds
* Extend the lint to enums and unions
* Use the correct span for where clauses in tuple structs
* Try to early-out where possible
2019-06-18 22:54:51 +01:00
Matthew Jasper
36960a5a6f Remove an unnecessary HirId to DefId convertion 2019-06-18 22:54:51 +01:00
Matthew Jasper
63edd2c358 Remove the HirId/NodeId from where clauses
Also give them a span in the HIR
2019-06-18 22:54:51 +01:00
bors
605ea9d05c Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddyb
Refactor C FFI variadics to more closely match their C counterparts, and add Clone implementation

We had to make some changes to expose `va_copy` and `va_end` directly to users (mainly for C2Rust, but not exclusively):
- redefine the Rust variadic structures to more closely correspond to C: `VaList` now matches `va_list`, and `VaListImpl` matches `__va_list_tag`
- add `Clone` for `VaListImpl`
- add explicit `as_va_list()` conversion function from `VaListImpl` to `VaList`
- add deref coercion from `VaList` to `VaListImpl`
- add support for the `asmjs` target

All these changes were needed for use cases like:
```Rust
let mut ap2 = va_copy(ap);
vprintf(fmt, ap2);
va_end(&mut ap2);
```
2019-06-18 21:50:46 +00:00
Santiago Pastorino
f4737d5607 Make Place::ty iterate 2019-06-18 22:06:00 +02:00
Cedric
2191c1db08 improve indentation 2019-06-18 22:05:27 +02:00
Ralf Jung
d8eea9258a create an issue for miri even in status test-fail 2019-06-18 21:57:31 +02:00
bors
04a3dd8a87 Auto merge of #61891 - eddyb:lifetime-cleanups, r=oli-obk
rustc: remove 'x: 'y bounds (except where necessary or from comments/strings).

This PR removes all lifetime-lifetime "outlives" bounds (e.g. `'tcx: 'a`) bounds except a few necessary ones (see the `reintroduce lifetime bounds where necessary` commit).

Some of these bounds kept around otherwise-unused lifetimes (e.g. `<'a, 'tcx: 'a>` followed by uses of `'tcx` but not `'a`) - these lifetimes (i.e. `'a`) were then removed.
(maybe they should be considered unused by the lint? cc @matthewjasper @zackmdavis)

r? @oli-obk cc @rust-lang/compiler
2019-06-18 19:04:15 +00:00
Alex Crichton
831ddf700d ci: Add a script for generating CPU usage graphs
This commit checks in a script which generates CPU usage graphs over
time, expanding on the previous comment that was include in the
collection file.
2019-06-18 09:51:39 -07:00
bors
673cf7de44 Auto merge of #61932 - matthiaskrgr:submodule_upd, r=oli-obk
submodules: update clippy from be5d17fe to 868f168c

Changes:
````
rustup https://github.com/rust-lang/rust/pull/61836/
fix suggestion for floating points inequality
````
r? @oli-obk
2019-06-18 16:08:17 +00:00
Eduard-Mihai Burtescu
2be847b2f9 test: normalize away the line/column info in ui/pattern/const-pat-ice. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
ea78c3aa33 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
4c4fc7512e rustc: reintroduce lifetime bounds where necessary. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
356a37d8d1 rustc: remove unused lifetimes. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
1d0cb40908 rustc: remove leftover lifetimes with no bounds from where clauses. 2019-06-18 18:10:25 +03:00
Eduard-Mihai Burtescu
b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
Eduard-Mihai Burtescu
dedf2eda8f rustc_typeck: correctly compute Substs for Res::SelfCtor. 2019-06-18 17:02:26 +03:00
Matthias Krüger
6a084dc0e7 submodules: update clippy from be5d17fe to 868f168c
Changes:
````
rustup https://github.com/rust-lang/rust/pull/61836/
fix suggestion for floating points inequality
````
2019-06-18 15:43:41 +02:00
Michael Bradshaw
0f9dc6c48e Make MaybeUninit #[repr(transparent)]
Tracking issue: #60405
2019-06-18 06:31:23 -07:00
bors
44fb88d252 Auto merge of #61927 - RalfJung:miri, r=oli-obk
update miri

Tests fail since https://github.com/rust-lang/rust/pull/61885, this should fix that.

r? @oli-obk
2019-06-18 11:18:45 +00:00
bors
0376941156 Auto merge of #61822 - JohnTitor:add-long-e0592, r=GuillaumeGomez,Centril
Add explanation for E0592

This is a part of #61137

r? @GuillaumeGomez
2019-06-18 08:30:38 +00:00
Vadim Petrochenkov
e152554e11 resolve/expand: Move expansion info setting to a single earlier point 2019-06-18 11:01:20 +03:00
Vadim Petrochenkov
1ff3bce5bb hygiene: Avoid some unnecessary ExpnInfo clones 2019-06-18 10:48:56 +03:00
Vadim Petrochenkov
2de2278f1a syntax: Move default_transparency into ExpnInfo 2019-06-18 10:48:56 +03:00
Vadim Petrochenkov
8ec502eecd syntax: Introduce default/with_unstable constructors for ExpnInfo 2019-06-18 10:48:56 +03:00
Vadim Petrochenkov
68e1141c45 resolve: Avoid creating fresh syntax extensions for all non-macro attributes 2019-06-18 10:48:56 +03:00
Vadim Petrochenkov
085a8d0375 syntax: Remove DummyResolver 2019-06-18 10:48:56 +03:00
Vadim Petrochenkov
679000cc0e allow_internal_unstable: Avoid some more allocations 2019-06-18 10:48:56 +03:00
Vadim Petrochenkov
961ba8f9ef syntax: Factor out common fields from SyntaxExtension variants 2019-06-18 10:48:56 +03:00
Ralf Jung
2987704062 update miri 2019-06-18 08:14:03 +02:00