Commit Graph

109361 Commits

Author SHA1 Message Date
bors
374ab25585 Auto merge of #70163 - nikic:llvm-10-preparation, r=cuviper
Prepare for LLVM 10 upgrade

This is #67759 minus the submodule update.

 * Fix two compatibility issues in the rustllvm wrapper.
 * Update data layout strings in tests.
 * Fix LLVM version comparison (this become a problem because the major version has two digits now).

r? @cuviper
2020-03-24 12:42:54 +00:00
bishtpawan
150916047b Add explanation for inner attribute 2020-03-24 17:11:04 +05:30
Bastian Kauschke
6c4d5d9896 improve normalize cycle error 2020-03-24 11:24:24 +01:00
bishtpawan
10226daa4e Update tools_lints 2020-03-24 15:41:31 +05:30
bors
1add455ec6 Auto merge of #69894 - vtbassmatt:master, r=nellshamrell
establish immutable source for RUST_CONFIGURE_ARGS

fixes https://github.com/rust-lang/rust/issues/68671
2020-03-24 09:38:41 +00:00
Mazdak Farrokhzad
f1701ddef1 rustc: remove rustc_hir_pretty dependency. 2020-03-24 08:44:55 +01:00
bishtpawan
cd9921ed82 Refactor changes 2020-03-24 13:09:18 +05:30
Mazdak Farrokhzad
92885e3a5b rustc_typeck: remove rustc_hir_pretty usage 2020-03-24 08:38:32 +01:00
Ralf Jung
7a73b879cb fix const_prop ICE 2020-03-24 08:34:28 +01:00
bishtpawan
03bb3bde90 Add long error explanation for E0710 #61137 2020-03-24 13:03:01 +05:30
Ralf Jung
58a56cc8c0 bless you 2020-03-24 08:27:46 +01:00
Ralf Jung
69cf211d06 get back the more precise error message 2020-03-24 08:27:46 +01:00
Ralf Jung
f70af91e51 bless; add test for mutating a static 2020-03-24 08:27:46 +01:00
Ralf Jung
9d9649adea move ModifiedStatic error to ConstEval errors, and generally adjust terminology from "static" to "global" where appropriate 2020-03-24 08:27:45 +01:00
bors
9d0ae58d30 Auto merge of #70351 - Centril:rollup-tveoq3w, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #68884 (Make the `type_of` return a generic type for generators)
 - #69788 (Fix sequence of Type and Trait in optin-builtin-traits in Unstable Book)
 - #70074 (Expand: nix all fatal errors)
 - #70077 (Store idents for `DefPathData` into crate metadata)
 - #70213 (traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet).)
 - #70259 (Use Reveal::All in MIR optimizations)
 - #70284 (correctly handle const params in type_of)
 - #70289 (Refactor `codegen`)

Failed merges:

r? @ghost
2020-03-24 06:14:41 +00:00
Mazdak Farrokhzad
170112cd15
Rollup merge of #70289 - nnethercote:refactor-codegen, r=eddyb
Refactor `codegen`

`codegen` in `src/librustc_codegen_llvm/back/write.rs` is long and has complex control flow. These commits refactor it and make it easier to understand.
2020-03-24 07:13:42 +01:00
Mazdak Farrokhzad
d309058101
Rollup merge of #70284 - lcnr:issue70273-what-the-heck-git, r=eddyb
correctly handle const params in type_of

extends #70223, retry of #70276

fixes #70273

r? @eddyb cc @varkor
2020-03-24 07:13:40 +01:00
Mazdak Farrokhzad
0d5b83df26
Rollup merge of #70259 - wesleywiser:use_reveal_all, r=eddyb
Use Reveal::All in MIR optimizations

Resolves some code review feedback in #67662.

Fixes #68855

r? @eddyb
2020-03-24 07:13:38 +01:00
Mazdak Farrokhzad
7bd86cee49
Rollup merge of #70213 - eddyb:stalled-on-ty-or-const, r=nikomatsakis
traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet).

This PR addresses the representation side of #70180, but only *actually collects* `ty::Infer`s via `Ty::walk` into `stalled_on` (collecting `ty::ConstKind::Infer`s requires #70164).

However, it should be enough to handle #70107's needs (WF obligations are stalled only on the outermost type/const being an inference variable, no `walk`-ing is involved).

This is my second attempt, see #70181 for the previous one, which unacceptably regressed perf.

r? @nikomatsakis cc @nnethercote
2020-03-24 07:13:37 +01:00
Mazdak Farrokhzad
d626f5bc66
Rollup merge of #70077 - Aaron1011:feature/new-def-path-ident, r=petrochenkov
Store idents for `DefPathData` into crate metadata

Previously, we threw away the `Span` associated with a definition's
identifier when we encoded crate metadata, causing us to lose location
and hygiene information.

We now store the identifier's `Span` in a side table, which gets encoded
into the crate metadata. When we decode items from the metadata, we
combine the name and span back into an `Ident`.

This improves the output of several tests, which previously had messages
suppressed due to dummy spans.

This is a prerequisite for #68686, since throwing away a `Span` means
that we lose hygiene information.
2020-03-24 07:13:35 +01:00
Mazdak Farrokhzad
3d8b9614d3
Rollup merge of #70074 - Centril:unpanictry, r=petrochenkov
Expand: nix all fatal errors

Basically, we go after all `.span_fatal` / `FatalError.raise()` and similar things and remove them one by one until there are no fatal errors left.

r? @petrochenkov
2020-03-24 07:13:33 +01:00
Mazdak Farrokhzad
0a39964ed2
Rollup merge of #69788 - ArekPiekarz:unstable_book_optin_builtin_traits, r=Dylan-DPC
Fix sequence of Type and Trait in optin-builtin-traits in Unstable Book

A simple fix in docs - the sequence of words in basic example of negative trait implementation was reversed.
2020-03-24 07:13:31 +01:00
Mazdak Farrokhzad
a1309547f9
Rollup merge of #68884 - Zoxc:gen-type, r=nikomatsakis
Make the `type_of` return a generic type for generators

Fixes https://github.com/rust-lang/rust/issues/67651.

r? @nikomatsakis
2020-03-24 07:13:28 +01:00
Jubilee
eaa6488ca7
Request "-Z unstable-options" for unstable options
Explicitly requests the "-Z unstable-options" flag if someone attempts to use
a cargo option gated by it. This enhances discoverability, particularly in the
instance where the user is on the nightly compiler but isn't using the flag.
2020-03-23 22:54:06 -07:00
Mazdak Farrokhzad
470e16372f pacify missing sysroot spans issue 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
c415f12582 fix rebase fallout due to #69497. 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
d07103508a fix rebase fallout 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
d8080d828c expand: address review comments 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
21944b3a10 expand: add recovery for parse_nt 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
3979964200 defatalize expand_test_or_bench 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
0e0f9311da defatalize get_test_runner 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
2868045a28 expand: nix unused method 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
1bfa2483d5 defatalize compile_declarative_macro 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
df9cec2df4 mbe::transcribe: defatalize errors. 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
ad26401dc1 remove ExtCxt::struct_span_warn 2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
c1ef1b3bca defatalize ProcMacroDerive::expand
Also remove ExtCtxt::struct_span_fatal.
2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
ce8880d1d8 defatalize AttrProcMacro::expand 2020-03-24 06:28:55 +01:00
Mazdak Farrokhzad
35cca74212 defatalize BangProcMacro::expand 2020-03-24 06:28:55 +01:00
Mazdak Farrokhzad
b0537e2081 generic_extension: defatalize Error case 2020-03-24 06:28:55 +01:00
Mazdak Farrokhzad
b7909b22b5 nix remaining rustc_expand::panictry! uses. 2020-03-24 06:28:55 +01:00
Mazdak Farrokhzad
0a8db690a4 nix panictry! in ParserAnyMacro::make 2020-03-24 06:28:10 +01:00
Mazdak Farrokhzad
0f2d9686cc rustc_expand::base: nix panictry! uses 2020-03-24 06:28:10 +01:00
Mazdak Farrokhzad
b3866a5c93 move rustc_hir::print -> rustc_hir_pretty 2020-03-24 06:25:03 +01:00
Mazdak Farrokhzad
b60d732efe rustc_hir: nix rustc_errors dep 2020-03-24 06:22:27 +01:00
Mazdak Farrokhzad
f07802c0de decouple rustc_hir::print from crate 2020-03-24 06:22:27 +01:00
Mazdak Farrokhzad
12e4f9f69a hir::map: simplify matching code 2020-03-24 06:17:44 +01:00
Mazdak Farrokhzad
22b2781fa5 {rustc::hir::map -> rustc_passes}::hir_id_validator 2020-03-24 04:59:39 +01:00
Nicholas Nethercote
46c8a2c26e Remove -Z incremental.
`-C incremental` was introduced over two years ago. `-Z incremental` was
kept for transitioning, but it's been long enough now that it should be
ok to remove it.
2020-03-24 12:08:30 +11:00
Nicholas Nethercote
a3782671cf Remove several dead -Z options. 2020-03-24 12:07:26 +11:00
Nicholas Nethercote
fa432597ea Invert -Z generate-arange-section.
Because it uses `parse_bool` and defaults to true, it is actually
impossible to set it to false. Inverting its sense to `-Z
no-generate-arange-section` makes it usable.
2020-03-24 12:07:26 +11:00