Commit Graph

109144 Commits

Author SHA1 Message Date
Ana-Maria Mihalache
0f7840b89b Rename LayoutDetails to just Layout. 2020-03-25 15:06:48 +00:00
Ralf Jung
7400955e94 add usize methods for Size getters 2020-03-25 15:53:53 +01:00
Ralf Jung
b7db7320ad go back to infix ops for Size 2020-03-25 15:53:53 +01:00
Ralf Jung
1d67ca00a1 add helper method for ptr ops on Scalar; reduce unnecessary large operand of overflowing_signed_offset 2020-03-25 15:53:53 +01:00
Ralf Jung
afcb6342fa use Size addition instead of checked int addition 2020-03-25 15:53:52 +01:00
Ralf Jung
0bc108a13b make Size::from* methods generic in the integer type they accept 2020-03-25 15:53:52 +01:00
Ralf Jung
f16b491015 remove unnecessary cast 2020-03-25 15:53:52 +01:00
Ralf Jung
d7e2650db2 miri: avoid a bunch of casts by offering usized-based field indexing 2020-03-25 15:53:52 +01:00
Ralf Jung
cd15b659c7 avoid double-cast in mplace_field 2020-03-25 15:53:52 +01:00
Ralf Jung
9de600892d make bit_width return u64, consistently with other sizes in the compiler 2020-03-25 15:53:52 +01:00
Ralf Jung
1ddbdc6269 use checked casts and arithmetic in Miri engine 2020-03-25 15:53:52 +01:00
Ralf Jung
5be304b0b4 miri: simplify shift operator overflow checking 2020-03-25 15:48:53 +01:00
bors
3c1d9adb3c Auto merge of #70297 - nnethercote:clean-up-debugging-options, r=michaelwoerister
Clean up debugging options

I found various sub-optimal things when I was looking at option handling.
2020-03-25 14:46:51 +00:00
Mazdak Farrokhzad
c70aa344e4 borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
Mazdak Farrokhzad
bd3482632e simplify check_pat_tuple_struct 2020-03-25 09:32:39 +01:00
Ralf Jung
b5343d6baa rename def_id -> static_def_id 2020-03-25 08:47:59 +01:00
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
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