Commit Graph

103403 Commits

Author SHA1 Message Date
Tyler Mandry
bb6236cd74
Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPC
Various tweaks to diagnostic output
2019-11-26 17:56:19 -06:00
Tyler Mandry
0b3d4a1fa4
Rollup merge of #66737 - GuillaumeGomez:err-codes-cleanup, r=Dylan-DPC
Error codes cleanup

r? @Dylan-DPC
2019-11-26 17:56:17 -06:00
Tyler Mandry
bf25f8ee19
Rollup merge of #66720 - Mark-Simulacrum:error-reported, r=Centril
Move ErrorReported to rustc_errors

The new location is more consistent with what this type is for, though we don't remove it from the old location (via a re-export) to avoid changing the dozens of use sites (~139 at this time).
2019-11-26 17:56:16 -06:00
Tyler Mandry
f178d35ae7
Rollup merge of #66719 - Mark-Simulacrum:int-normalization, r=Centril
Store pointer width as u32 on Config

This removes the dependency on IntTy, UintTy from Session.

It's not obviously a win, but it seems a bit odd to store the AST IntTy/UintTy in Session, rather we store the pointer width as an integer and add normalization methods to IntTy and UintTy.
2019-11-26 17:56:15 -06:00
Tyler Mandry
ac7e604760
Rollup merge of #66717 - dtolnay:tidy, r=Mark-Simulacrum
tidy: Accommodate rustfmt's preferred layout of stability attributes

Previously tidy would require that the `feature = "name_of_feature"` part of the stability attribute was on the same line as the `#[stable(` / `#[unstable(` opening part of the attribute, and that `)]` was on the same line as the last key-value pair.

That didn't work with rustfmt's preferred layout of long attributes, which is like:

```rust
#[unstable(
    feature = "c_variadic",
    reason = "the `c_variadic` feature has not been properly tested on \
              all supported platforms",
    issue = "44930"
)]
```
2019-11-26 17:56:13 -06:00
Tyler Mandry
7ef7005422
Rollup merge of #66713 - hermitcore:hermit, r=alexcrichton
introduce a target to build the kernel of the unikernel HermitCore

We are developing the unikernel HermitCore, where the kernel is written in Rust and is already supported by the Rust Standard Library. To compile the kernel with the new build flag "-Z build-std", we introduce a new target, which avoids the usage of SSE & AVX within the kernel.
2019-11-26 17:56:11 -06:00
Tyler Mandry
9e2802b57b
Rollup merge of #66711 - mattico:aarch-msvc-fp, r=nagisa
Add hardware floating point features to aarch64-pc-windows-msvc

Fixes #66701
2019-11-26 17:56:10 -06:00
Tyler Mandry
a0e756bc79
Rollup merge of #66663 - RalfJung:miri-leaks, r=oli-obk
Miri: print leak report even without tracing

Currently, the rustup-installed Miri has no way to actually print a leak report (as `trace!` is compiled out). Make it print that per default instead when there is a leak.

r? @oli-obk
2019-11-26 17:56:08 -06:00
Tyler Mandry
a49f23e05d
Rollup merge of #66661 - msizanoen1:riscv-gnu, r=alexcrichton
Add riscv64gc-unknown-linux-gnu target

This PR add the target, but doesn't build std on CI yet.
I have a port for `libc` crate and std which I will upstream soon after this target is added.

r? @alexcrichton
2019-11-26 17:56:07 -06:00
Tyler Mandry
941d915942
Rollup merge of #66128 - emilio:new-zeroed, r=SimonSapin
alloc: Add new_zeroed() versions like new_uninit().

MaybeUninit has both uninit() and zeroed(), it seems reasonable to have the same
surface on Box/Rc/Arc.

Needs tests.

cc #63291
2019-11-26 17:56:05 -06:00
Matthew Jasper
1f850f61ea Record temporary static references in generator witnesses 2019-11-26 23:18:41 +00:00
Christian Poveda
d7c09f7e1e Change way of checking SetDiscriminant 2019-11-26 17:23:24 -05:00
Camille GILLOT
7e72b36299 Move local Arena to Queries. 2019-11-26 23:16:48 +01:00
Camille GILLOT
7b71e9a9df Formatting. 2019-11-26 22:57:02 +01:00
Camille GILLOT
b99513be57 Have Queries own the GlobalCtxt.
The construction of the GlobalCtxt is moved from a generator's stack to
the Queries struct.  Since the GlobalCtxt requires the HIR Forest and the
arenas to live longer, those are moved into Queries the same way.

The resulting handling of objects is more brittle, because consumers of
the Once objects need to be careful of their initialisation.
2019-11-26 22:51:02 +01:00
Camille GILLOT
58a9c73bbd Make the HIR map own the Definitions. 2019-11-26 22:48:41 +01:00
Taylor Cramer
2083e2a647 Stabilize nested self receivers
Previously, only Self, &Self, &mut Self, Arc<Self>, Rc<Self>,
and Box<Self> were available as stable method receivers.

This commit stabilizes nested uses of all the above types.
However, nested receivers remain non-object-safe.
2019-11-26 13:35:33 -08:00
Christian Poveda
c66ad14057 Check SetDiscriminant place 2019-11-26 16:00:43 -05:00
bors
a7d791b450 Auto merge of #66646 - RalfJung:unwind_to_block, r=oli-obk
refactor goto_block and also add unwind_to_block

r? @oli-obk
2019-11-26 20:38:47 +00:00
Dylan MacKenzie
a626bf68b8 Remove test for #66758 2019-11-26 12:13:15 -08:00
Mark Rousskov
2299586ffc Move ErrorReported to rustc_errors 2019-11-26 14:57:07 -05:00
Dylan MacKenzie
582affd657 Add regression test for #66756 2019-11-26 11:37:16 -08:00
Dylan MacKenzie
2626cfbb58 Allow Unreachable terminators behind const_if_match 2019-11-26 11:36:53 -08:00
Janusz Marcinkiewicz
5c34a11324 Refactor 'parse_enum_item' to use 'parse_delim_comma_seq' 2019-11-26 19:24:36 +01:00
Joshua Nelson
f1f83ef8f8
Test multiple variants
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-26 12:37:55 -05:00
Camille GILLOT
144d1c2171 Review nits. 2019-11-26 17:20:32 +01:00
bors
797fd92628 Auto merge of #66776 - Mark-Simulacrum:revert-try-breakage, r=Mark-Simulacrum
Revert "DO NOT MERGE: enable windows try builder"

This reverts commit 90a37bce44.
2019-11-26 16:03:50 +00:00
Mara Bos
d220ed4fd7 Add tracking issue number. 2019-11-26 16:32:46 +01:00
Mara Bos
fd9b986bfe Add core::{f32,f64}::consts::TAU. 2019-11-26 16:32:46 +01:00
Guanqun Lu
55d725884b follow the same function order in the trait
This removes several warnings in IDE.
2019-11-26 22:55:38 +08:00
Nadrieril
0881750173 Move tests to ui, split them and add some 2019-11-26 14:53:54 +00:00
Nadrieril
cdc844e81f Make the ice a fatal error 2019-11-26 14:32:47 +00:00
Mark Rousskov
47b3d4d8c9 Revert "DO NOT MERGE: enable windows try builder"
This reverts commit 90a37bce44.
2019-11-26 08:06:13 -05:00
Oliver Scherer
a3297562f6 Show the sign of signed interpreter values 2019-11-26 14:02:23 +01:00
Guillaume Gomez
2af8cd2de8 Clean up E0075 long explanation 2019-11-26 13:47:45 +01:00
Guillaume Gomez
77ecb6d44a Clean up E0072 long explanation 2019-11-26 13:40:48 +01:00
bors
1dc3686f8b Auto merge of #66631 - michaelwoerister:additional-pgo-tests, r=alexcrichton
Add additional regression tests for PGO

This PR adds regression tests for making sure that
- instrumentation records the right counts for branches taken and functions called, and that
- the indirect call promotion pass actually is able to promote indirect calls.

r? @alexcrichton
2019-11-26 12:35:39 +00:00
Camille GILLOT
68b1ac9874 Reduce righward drift. 2019-11-26 12:23:35 +01:00
Michael Woerister
34fbc718d1 PGO: Make branch-weights regression test more robust. 2019-11-26 10:34:48 +01:00
Ralf Jung
babe9fcbc1 rename update_count_then_panic -> rust_panic_without_hook 2019-11-26 10:23:15 +01:00
Ralf Jung
4a19ef938c explain why __rust_start_panic does not take a Box 2019-11-26 09:29:39 +01:00
Ralf Jung
61486f4de3 expand comment 2019-11-26 09:27:11 +01:00
Ralf Jung
3e96ca2bf7 abort on BoxMeUp misuse 2019-11-26 09:24:39 +01:00
Ralf Jung
3a8e1b63cf panic_handler -> begin_panic_handler (and more comments) 2019-11-26 08:21:51 +01:00
bors
0f6f66fcdc Auto merge of #66561 - TimoFreiberg:trait-name-report, r=estebank
Add version mismatch help message for unimplemented trait

Improves issue #22750

The error reporting for E0277 (the trait `X` is not implemented for `Foo`)
now checks whether `Foo` implements a trait with the same path as `X`,
which probably means that the programmer wanted to actually use only one
version of the trait `X` instead of the two.

Still open:
* the same diagnostic should be added for [the trait method case](https://github.com/rust-lang/rust/issues/22750#issuecomment-372077056)
* Showing the real crate versions would be nice, but rustc currently doesn't have that information [according to Esteban](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/diagnostics.20for.20crate.20version.20mismatch/near/180572989)
2019-11-26 05:07:02 +00:00
bors
2626f3d3d5 Auto merge of #66522 - tmiasko:sanitize-flags, r=alexcrichton
Add support for sanitizer recover and tracking origins of uninitialized memory

* Add support for sanitizer recovery `-Zsanitizer-recover=...` (equivalent to `-fsanitize-recover` in clang).
* Add support for tracking origins of uninitialized memory in MemorySanitizer `-Zsanitizer-memory-track-origins` (equivalent to `-fsanitize-memory-track-origins` in clang).
2019-11-26 01:54:53 +00:00
Joshua Nelson
37f440fd9a Add wildcard test for const_if_match
Closes https://github.com/rust-lang/rust/issues/66758
2019-11-25 19:44:35 -05:00
Parth Mehrotra
395408ec18
Update documentation-tests.md 2019-11-25 19:34:32 -05:00
Ralf Jung
3c48579551 more panicking comments 2019-11-25 23:55:54 +01:00
Christopher Durham
f8a4b6d2ba
impl TrustedLen for vec::Drain 2019-11-25 17:55:26 -05:00