Commit graph

95040 commits

Author SHA1 Message Date
Stjepan Glavina
d2c9c12546 Add #[stable] to Error impl 2019-08-04 15:11:08 +02:00
Stjepan Glavina
d6c3196d02 Add a few trait impls for AccessError 2019-06-20 09:30:45 +02:00
bors
3c805ce183 Auto merge of #60341 - mtak-:macos-tlv-workaround, r=alexcrichton
macos tlv workaround

fixes: #60141

Includes:
* remove dead code: `requires_move_before_drop`. This hasn't been needed for a while now (oops I should have removed it in #57655)
* redox had a copy of `fast::Key` (not sure why?). That has been removed.
* Perform a `read_volatile` on OSX to reduce `tlv_get_addr` calls per `__getit` from (4-2 depending on context) to 1.

`tlv_get_addr` is relatively expensive (~1.5ns on my machine).

Previously, in contexts where `__getit` was inlined, 4 calls to `tlv_get_addr` were performed per lookup. For some reason when `__getit` is not inlined this is reduced to 2x - and performance improves to match.

After this PR, I have only ever seen 1x call to `tlv_get_addr` per `__getit`, and macos now benefits from situations where `__getit` is inlined.

I'm not sure if the `read_volatile(&&__KEY)` trick is working around an LLVM bug, or a rustc bug, or neither.

r? @alexcrichton
2019-06-20 02:36:49 +00:00
bors
7d10761349 Auto merge of #61947 - estebank:ice-ice-revolution, r=matthewjasper
Fix ICE involving mut references

Fix #61623, fix #61944, fix #61751.
2019-06-19 22:23:45 +00:00
bors
2fe7b3383c Auto merge of #61967 - lzutao:clippy-update, r=oli-obk
submodules: Update clippy from 868f168c to 149a988

r? @oli-obk
2019-06-19 19:28:28 +00:00
tyler
b148c25cac fix compile-fail test for targets without thread locals 2019-06-19 11:50:23 -07:00
Lzu Tao
405f655942 Update clippy from 868f168c to 149a988 2019-06-19 17:30:55 +00:00
bors
5e0c6a69e0 Auto merge of #61962 - Centril:rollup-y6sg1zw, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #60667 ( Add functions for building raw slices to libcore )
 - #61547 (Support `cfg` and `cfg_attr` on generic parameters)
 - #61861 (Update rustfmt and rls)
 - #61940 (Make Place::ty iterate)

Failed merges:

r? @ghost
2019-06-19 16:37:58 +00:00
Esteban Küber
8a415d145a review comment 2019-06-19 09:25:48 -07:00
Mazdak Farrokhzad
bf6c505c23
Rollup merge of #61940 - spastorino:place-ty-iterate, r=oli-obk
Make Place::ty iterate

r? @oli-obk

Related to Place 2.0
2019-06-19 17:34:39 +02:00
Mazdak Farrokhzad
d88b7b2136
Rollup merge of #61861 - topecongiro:rustfmt-1.3.0, r=topecongiro
Update rustfmt and rls

This PR bumps the version of rustfmt to 1.3.0.
2019-06-19 17:34:38 +02:00
Mazdak Farrokhzad
7b3984b21b
Rollup merge of #61547 - petrochenkov:cfgen, r=Centril
Support `cfg` and `cfg_attr` on generic parameters

`cfg` attributes are supported in all other positions where attributes are accepted at all.

They were previously prohibited in https://github.com/rust-lang/rust/pull/51283 because they weren't implemented correctly before that and were simply ignored.
2019-06-19 17:34:36 +02:00
Mazdak Farrokhzad
564326a626
Rollup merge of #60667 - oli-obk:raw_from_raw_parts, r=sfackler
Add functions for building raw slices to libcore

implement https://github.com/rust-lang/rust/issues/36925
2019-06-19 17:34:35 +02:00
topecongiro
5a411a65d0
Update rustfmt and rls
Update rustfmt to 1.3.0.
2019-06-19 23:54:31 +09:00
bors
e79b2a18a2 Auto merge of #61172 - matthewjasper:cleanup-implied-bounds-lint, r=varkor
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
* Remove unnecessary bounds in rustc crates
2019-06-19 12:41:38 +00:00
bors
9cb052acfb Auto merge of #58351 - oli-obk:double_check_const_eval, r=RalfJung
Refactor interning to properly mark memory as mutable or immutable

r? @RalfJung

This implementation is incomplete out of multiple reasons

* [ ] add `-Zunleash_the_miri_inside_of_you` tests
* [ ] report an error if there's an `UnsafeCell` behind a reference in a constant
* [ ] make validity checks actually test whether the mutability of their allocations match what they see in the type
2019-06-19 09:43:58 +00:00
Oliver Scherer
cd290c7ee9 packed -> repr(packed) 2019-06-19 11:20:38 +02:00
Oliver Scherer
ce39fff66b Fix comment about alignments 2019-06-19 11:18:03 +02:00
Oliver Scherer
3977cc2b37 Remove now-unnecessary lifetime 2019-06-19 10:34:32 +02:00
Oliver Scherer
62af19b614 More FIXMEs 2019-06-19 10:03:53 +02:00
Vadim Petrochenkov
0b58bb32f6 Support cfg and cfg_attr on generic parameters 2019-06-19 10:59:15 +03:00
Oliver Scherer
fd426a6ae9 Explain existance of Align field 2019-06-19 09:57:07 +02:00
Oliver Scherer
fb37bf0037 Weave the alignment through ByRef 2019-06-19 09:53:32 +02:00
Oliver Scherer
921f0d9ca9 Outright ignore any alignment in const_field 2019-06-19 09:52:36 +02:00
Oliver Scherer
667f94cb24 Update ui test output 2019-06-19 09:52:36 +02:00
Oliver Scherer
6229a8f1f6 Elaborate some more on what mutability field means what 2019-06-19 09:52:36 +02:00
Oliver Scherer
521d38adb5 Update to TyCtxt lifetime changes 2019-06-19 09:52:36 +02:00
Oliver Scherer
a18d99abaa Fix typo 2019-06-19 09:52:35 +02:00
Oliver Scherer
5734558881 The future is now 2019-06-19 09:52:35 +02:00
Oliver Scherer
98bf737614 s/intern/intern_shallow/ 2019-06-19 09:52:35 +02:00
Oliver Scherer
104b108406 Add and update more tests 2019-06-19 09:52:35 +02:00
Oliver Scherer
13f35de19d Elaborate on a comment 2019-06-19 09:52:35 +02:00
Oliver Scherer
9e3fbcfd57 Merge StaticMut and Static logic 2019-06-19 09:52:35 +02:00
Oliver Scherer
d6fa4070be Fix rebase fallout 2019-06-19 09:52:35 +02:00
Oliver Scherer
b52f6f4ca8 Elaborate on why we don't look at frozenness 2019-06-19 09:52:35 +02:00
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