Commit Graph

108939 Commits

Author SHA1 Message Date
Pietro Albini
b9c3633847
ci: don't move the build to C: on GitHub Actions
On Azure Pipeliones, the C: filesystem is huge with a lot of free space,
while D: is small. By default builds happened in D:, so we added a
script to symlink the big directories to C:, granting us more space.

    Filesystem  Size  Used Avail Use%
    C:          256G  143G  114G  56%
    D:           14G  2.0G   13G  15%

On GitHub Actions instead C: is almost full, and we have a lot of free
space on D:, where the build happens.

    Filesystem  Size  Used Avail Use%
    C:          128G  114G   15G  89%
    D:          56G   4.8G   52G   9%

This commit stops creating the symlink on GitHub Actions, fixing the out
of disk space errors we were seeing on some Windows builders.
2020-03-24 15:36:09 +01:00
Pietro Albini
9beb8f5477
ci: add github actions configuration 2020-03-24 15:36:07 +01:00
Pietro Albini
9d5c416037
ci: rename script windows-symlink-build-dir to symlink-build-dir
There will be a need to symlink the Linux build directory in the future
as well, so let's make the script name generic.
2020-03-24 15:34:57 +01:00
Pietro Albini
b4f71cd477
ci: fix azure pipeline specific code in install-awscli 2020-03-24 15:34:55 +01:00
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
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
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
bors
342c5f33d0 Auto merge of #70343 - Centril:rollup-94egfvs, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #67761 (Move the dep_graph construction to a dedicated crate.)
 - #69740 (Replace some desc logic in librustc_lint with article_and_desc)
 - #69981 (Evaluate repeat expression lengths as late as possible)
 - #70087 (Remove const eval loop detector)
 - #70242 (Improve E0308 error message wording)
 - #70264 (Fix invalid suggestion on `&mut` iterators yielding `&` references)
 - #70267 (get rid of ConstPropUnsupported; use ZST marker structs instead)
 - #70277 (Remove `ReClosureBound`)
 - #70283 (Add regression test for #70155.)
 - #70294 (Account for bad placeholder types in where clauses)
 - #70309 (Clean up E0452 explanation)

Failed merges:

r? @ghost
2020-03-24 00:53:25 +00:00
Mazdak Farrokhzad
3b8872d76d
Rollup merge of #70309 - GuillaumeGomez:cleanup-e0452, r=Dylan-DPC
Clean up E0452 explanation

r? @Dylan-DPC
2020-03-24 00:49:54 +01:00
Mazdak Farrokhzad
54db0cfe48
Rollup merge of #70294 - estebank:bad-placeholder-in-where, r=Centril
Account for bad placeholder types in where clauses

Fix #70291. Follow up to #69148.
2020-03-24 00:49:52 +01:00
Mazdak Farrokhzad
7cdab7ff90
Rollup merge of #70283 - CDirkx:regression-test-70155, r=oli-obk
Add regression test for #70155.

With #70166 merged, `RangeInclusive` now derives `PartialEq` and `Eq`, implementing structural equality and as a side effect the range is now usable with const generics, closing #70155.

As per [#70166 (comment)](https://github.com/rust-lang/rust/pull/70166#issuecomment-601872201) a test is added to avoid a change to the private fields or the equality implementation of the range from subtly reverting #70155.
2020-03-24 00:49:50 +01:00
Mazdak Farrokhzad
6c58e0194e
Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakis
Remove `ReClosureBound`

We now substitute external names for regions in the query response.

r? @nikomatsakis
2020-03-24 00:49:48 +01:00
Mazdak Farrokhzad
31845068cc
Rollup merge of #70267 - RalfJung:const-prop-unsup, r=oli-obk,wesleywiser
get rid of ConstPropUnsupported; use ZST marker structs instead

This gets rid of yet another machine-specific error variant.

r? @oli-obk
2020-03-24 00:49:46 +01:00
Mazdak Farrokhzad
ab2817bbd0
Rollup merge of #70264 - tirr-c:issue-69789-mut-suggestion, r=estebank
Fix invalid suggestion on `&mut` iterators yielding `&` references

Fixes #69789.

rustc suggested an invalid code when `&` reference from `&mut` iterator is mutated. The compiler knew we're mutating a value behind `&` reference, but as the assignment RHS is from desugaring, it could only see the iterator expression from source and inserted `mut` there.

r? @estebank
2020-03-24 00:49:45 +01:00
Mazdak Farrokhzad
7a47df8169
Rollup merge of #70242 - DeeDeeG:improve-e0308, r=Dylan-DPC
Improve E0308 error message wording

Hi folks,

I made [a post on Reddit](https://old.reddit.com/r/rust/comments/fmi11x/consider_linting_rusts_documentationerror_text/) about how (IMO) the docs/error messages can be a bit intimidating, one thing led to another, and I was encouraged to submit a Pull Request if I felt I could re-phrase the error message that I used as an example.

So that's this Pull Request. Open to any feedback or style changes, and I understand this is subjective.

(On another note: I am happy to see [this message was recently improved](https://github.com/rust-lang/rust/pull/69139) in `master`, so it's already better than it is in stable Rust 1.42.0.)

Ideally the last sentence could be split into at least two: [sentence explaining the inferred type.] [Sentence explaining explicit type.] [Sentence that summarizes that "this is bad," and why.]

But I'm not sure how to do so; I'm wary of writing something that turns out to be technically incorrect.
2020-03-24 00:49:43 +01:00
Mazdak Farrokhzad
72c99f2cf0
Rollup merge of #70087 - ecstatic-morse:remove-const-eval-loop-detector, r=RalfJung
Remove const eval loop detector

Now that there is a configurable instruction limit for CTFE (see #67260), we can replace the loop detector with something much simpler. See #66946 for more discussion about this. Although the instruction limit is nightly-only, the only practical way to reach the default limit uses nightly-only features as well (although CTFE will still execute code using such features inside an array initializer on stable).

This will at the very least require a crater run, since it will result in an error wherever the "long running const eval" warning appeared before. We may need to increase the default for `const_eval_limit` to work around this.

Resolves #54384 cc #49980
r? @oli-obk cc @RalfJung
2020-03-24 00:49:41 +01:00
Mazdak Farrokhzad
a73ed5aad9
Rollup merge of #69981 - oli-obk:const_blocks, r=eddyb
Evaluate repeat expression lengths as late as possible

Fixes #68567

r? @varkor
2020-03-24 00:49:39 +01:00
Mazdak Farrokhzad
ee9094869c
Rollup merge of #69740 - mark-i-m:describe-it-3, r=eddyb
Replace some desc logic in librustc_lint with article_and_desc

r? @eddyb @Centril @matthewjasper

Followup to https://github.com/rust-lang/rust/pull/69674

Blocked on #69498
2020-03-24 00:49:37 +01:00
Mazdak Farrokhzad
9da25d9faf
Rollup merge of #67761 - cjgillot:split_graph, r=Zoxc
Move the dep_graph construction to a dedicated crate.

The interface for librustc consists in two traits: `DepKind` and `DepContext`.

The `DepKind` is the main interface. It allows to probe properties of the dependency.
As before, `DepNode` is the pair of a `DepKind` object and a hash fingerprint.

The `DepContext` takes the place of the `TyCtxt`, and handles communication with the query engine.

The use of the `ImplicitCtxt` through `ty::tls` is done through the `DepKind` trait.
This may not be the best choice, but it seemed like the simplest.
2020-03-24 00:49:36 +01:00
Oliver Scherer
9b1893f310 Run rustfmt 2020-03-24 00:16:05 +01:00
Camille GILLOT
0f918cba3f Move import. 2020-03-23 23:19:08 +01:00
Camille GILLOT
9f4c8889e5 Fully qualify the path to DepKind.
This is needed since `middle::cstore` defines another type named
`DepKind`, and we should not rely on shadowing to get the right one.
2020-03-23 23:17:59 +01:00
Camille GILLOT
e0f7b897ba Address review. 2020-03-23 23:17:17 +01:00
Camille GILLOT
d08cc0ba67 Put extract_def_id back on DepNode. 2020-03-23 23:16:35 +01:00
Camille GILLOT
3a8bb20230 Remove assert_ignored and with_ignore_deps. 2020-03-23 23:15:51 +01:00