Commit Graph

109213 Commits

Author SHA1 Message Date
bors
02046a5d40 Auto merge of #70371 - Centril:rollup-ywi1vo3, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #70023 (clean up E0436 explanation)
 - #70234 (#[track_caller] on core::ops::{Index, IndexMut}.)
 - #70241 (Miri: move ModifiedStatic to ConstEval errors)
 - #70342 (IoSlice/IoSliceMut should be Send and Sync)
 - #70350 (Request "-Z unstable-options" for unstable options)
 - #70355 (Clean up E0454)
 - #70359 (must_use on split_off)
 - #70368 (Mark hotplug_codegen_backend as ignore-stage1)

Failed merges:

r? @ghost
2020-03-24 20:33:53 +00:00
Mazdak Farrokhzad
bf1ad2229f
Rollup merge of #70368 - bjorn3:patch-2, r=jonas-schievink
Mark hotplug_codegen_backend as ignore-stage1

Suggested by @eddyb in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/do.20we.20really.20need.20stage2.2E.2E.3F/near/191659846.
2020-03-24 21:32:37 +01:00
Mazdak Farrokhzad
db2c70bf4e
Rollup merge of #70359 - kornelski:mustsplit, r=Dylan-DPC
must_use on split_off

A couple more for #70194
2020-03-24 21:32:36 +01:00
Mazdak Farrokhzad
dc29016299
Rollup merge of #70355 - GuillaumeGomez:cleanup-e0454, r=Dylan-DPC
Clean up E0454

r? @Dylan-DPC
2020-03-24 21:32:34 +01:00
Mazdak Farrokhzad
f8ec23f2c0
Rollup merge of #70350 - workingjubilee:patch-1, r=Dylan-DPC
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.

This relates to, but does not end with or resolve, issue #65770.
2020-03-24 21:32:32 +01:00
Mazdak Farrokhzad
8d4b5ff121
Rollup merge of #70342 - withoutboats:io-slice-send-sync, r=Mark-Simulacrum
IoSlice/IoSliceMut should be Send and Sync

Closes #70308
2020-03-24 21:32:31 +01:00
Mazdak Farrokhzad
b8093bad58
Rollup merge of #70241 - RalfJung:global-mem, r=oli-obk
Miri: move ModifiedStatic to ConstEval errors

Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically `static` items).
2020-03-24 21:32:29 +01:00
Mazdak Farrokhzad
50d2f302cb
Rollup merge of #70234 - anp:tracked-std-traits, r=Amanieu
#[track_caller] on core::ops::{Index, IndexMut}.

Applies the attribute to `core::ops::Index(Mut)` and enough std internals to cover the [functions listed in "tier 1" in the original RFC](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md#survey-of-panicking-standard-functions).

Split out from #69251 to allow separate assessment of perf impact.

To my knowledge, this is the last piece of implementing RFC 2091.

Tracking issue: https://github.com/rust-lang/rust/issues/47809
2020-03-24 21:32:28 +01:00
Mazdak Farrokhzad
89feaf6d96
Rollup merge of #70023 - GuillaumeGomez:cleanup-e0436, r=Centril
clean up E0436 explanation

r? @Dylan-DPC
2020-03-24 21:32:26 +01:00
bjorn3
33cd9a2515
Mark hotplug_codegen_backend as ignore-stage1 2020-03-24 20:21:50 +01:00
Josh Stone
212e6ce7bf Implement Fuse with Option
The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.

The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.
2020-03-24 12:15:15 -07:00
Vadim Petrochenkov
1fa6be0358 resolve: Remove rustc_attrs as a standalone feature gate
Now it only gates specific built-in attributes
2020-03-24 21:37:29 +03:00
Esteban Küber
cfeedec823 Fix placement of suggested generic param when bounds are present 2020-03-24 11:36:08 -07:00
Jeremy Stucki
17b97eeb8a
fmt 2020-03-24 19:26:58 +01:00
Kornel
42b10e51c1 must_use on split_off
#70194
2020-03-24 17:35:40 +00:00
Bastian Kauschke
11763d48cf update mir opt test 2020-03-24 16:56:12 +01:00
bors
2dcf54f564 Auto merge of #70190 - pietroalbini:gha, r=Mark-Simulacrum
Add GitHub Actions configuration

This PR adds the GitHub Actions configuration to the rust-lang/rust repository. The configuration will be run in parallel with Azure Pipelines until the evaluation finishes: the infrastructure team will then decide whether to switch.

Since GitHub Actions doesn't currently have any way to include pieces of configuration, this also adds the `src/tools/expand-yaml-anchors` tool, which serves as a sort of templating system. Otherwise the configuration is a mostly straight port from the Azure Pipelines configuration (thanks to all the PRs opened in the past).

There are still a few small things I need to fix before we can land this, but it's mostly complete and ready for an initial review.

r? @Mark-Simulacrum
2020-03-24 15:49:27 +00:00
Without Boats
03c64bf532 spaces between braces really ruin readability 2020-03-24 15:39:29 +01:00
Pietro Albini
45910e74fd
ci: add notice on top of the azure pipelines configuration
This will inform contributors tweaking the Azure Pipelines configuration
that they also need to tweak the GitHub Actions setup.
2020-03-24 15:36:17 +01:00
Pietro Albini
f0bd035e2a
bootstrap: remove default and only_host from expand-yaml-anchors 2020-03-24 15:36:16 +01:00
Pietro Albini
89339df264
ci: run the "bors build finished" jobs only during try and auto runs 2020-03-24 15:36:14 +01:00
Pietro Albini
ba97ad3509
ci: move the whole workspace directory on gha/linux
Moving just the `obj` directory created problems with mountpoints and
Docker containers, so this tries to symlink the parent directory.
2020-03-24 15:36:13 +01:00
Pietro Albini
11aafa5305
ci: run gha workflows for try, auto and master on the fork 2020-03-24 15:36:12 +01:00
Pietro Albini
1ba762a193
ci: fix out of disk space errors on linux GHA
The /mnt mount point has 53GB of free disk space at the time of writing
this commit, so this moves the build there to avoid running out of disk
space during builds.
2020-03-24 15:36:10 +01:00
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
bishtpawan
b31707e683 Remove unknown lint from deny attribute 2020-03-24 19:06:08 +05:30
Ralf Jung
1939b4c940 actually we can reject all reads from mutable allocs in const-prop 2020-03-24 14:31:55 +01:00
Guillaume Gomez
5a62054b06 Clean up E0454 2020-03-24 13:58:00 +01:00
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