Commit Graph

109361 Commits

Author SHA1 Message Date
Ralf Jung
4920a3371f better explain GLOBAL_KIND choice 2020-03-25 08:46:58 +01:00
Mazdak Farrokhzad
bd156846fa improve non-exhaustive struct pat error 2020-03-25 08:35:17 +01:00
Mazdak Farrokhzad
58fee523cf is_union() instead of string comparsion 2020-03-25 07:02:30 +01:00
bishtpawan
5c65568f0b update tool_lints 2020-03-25 11:32:23 +05:30
bors
cdb50c6f25 Auto merge of #70383 - Centril:rollup-hmfft3y, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #70331 (Increase verbosity when using update syntax with private fields)
 - #70349 (move `hir_id_validation` to `rustc_passes` + simplify `hir::map` code)
 - #70361 (Update backtrace crate to 0.3.46)
 - #70364 (resolve: Remove `rustc_attrs` as a standalone feature gate)
 - #70369 (Fix smaller issues with invalid placeholder type errors)
 - #70373 (normalize some imports & prefer direct ones)
 - #70376 (Add test for #66312)

Failed merges:

r? @ghost
2020-03-25 05:46:43 +00:00
Mazdak Farrokhzad
83fc855d03
Rollup merge of #70376 - tmandry:issue-66312, r=Centril
Add test for #66312

Closes #66312. This issue was fixed by #68884.

r? @Zoxc
2020-03-25 06:45:38 +01:00
Mazdak Farrokhzad
d894f5eaf5
Rollup merge of #70373 - Centril:canon-imports, r=Mark-Simulacrum
normalize some imports & prefer direct ones

r? @Mark-Simulacrum
2020-03-25 06:45:36 +01:00
Mazdak Farrokhzad
cb17049b36
Rollup merge of #70369 - estebank:bad-placeholder-in-where, r=Centril
Fix smaller issues with invalid placeholder type errors

Follow up to #70294.

- Fix placement of suggested generic param when bounds are present.
- Reduce error duplication for invalid placeholder types in `fn` types.

r? @Centril
2020-03-25 06:45:35 +01:00
Mazdak Farrokhzad
3d0976a91b
Rollup merge of #70364 - petrochenkov:nofrustc, r=Centril
resolve: Remove `rustc_attrs` as a standalone feature gate

Now it only gates specific built-in attributes.

So if you want to make a rustc attribute, make it a built-in (this was already the case in practice for some time).
2020-03-25 06:45:33 +01:00
Mazdak Farrokhzad
3cced917ff
Rollup merge of #70361 - tmiasko:backtrace, r=Mark-Simulacrum
Update backtrace crate to 0.3.46

* Support line-tables-only when using libbacktrace
* Update libbacktrace to latest master
* Define HAVE_KERN_PROC on FreeBSD to fix rust-lang/rust#54434
2020-03-25 06:45:32 +01:00
Mazdak Farrokhzad
8aafb8a51f
Rollup merge of #70349 - Centril:hir-outa-rustc, r=Zoxc
move `hir_id_validation` to `rustc_passes` + simplify `hir::map` code

r? @Zoxc
2020-03-25 06:45:30 +01:00
Mazdak Farrokhzad
d03c02a589
Rollup merge of #70331 - jeremystucki:privacy, r=estebank
Increase verbosity when using update syntax with private fields

Resolves #70323
2020-03-25 06:45:27 +01:00
Nicholas Nethercote
e1d1db790f Remove TargetOptions::embed_bitcode.
It's unused by any existing targets, and soon we'll be embedding full
bitcode by default anyway.
2020-03-25 14:09:27 +11:00
Youngsuk Kim
bedc3587ce
fix type name typo in doc comments
InterpCtx => InterpCx 
(rustc_mir::interpret::InterpCx)
2020-03-24 21:34:36 -04:00
Esteban Küber
7534efa0ef Reduce error duplication for invalid placeholder types in fn types 2020-03-24 18:01:37 -07:00
Tyler Mandry
1a21c28e39 Add test for #66312
Closes #66312. This issue was fixed by #68884.
2020-03-24 16:44:45 -07:00
Mazdak Farrokhzad
917289907d normalize some imports, prefer direct ones. 2020-03-24 22:47:23 +01:00
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
Mark Rousskov
33b9e6f5cf Add richer printing 2020-03-24 16:24:47 -04:00
Vadim Petrochenkov
7332305305 Remove attribute #[structural_match] and any references to it 2020-03-24 22:58:15 +03: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