Commit Graph

122433 Commits

Author SHA1 Message Date
Camelid
2be403ce3e Warn on duplicate asm! options 2020-06-20 11:12:42 -07:00
Camelid
820bba1c46 Add codegen test for multiple asm! options 2020-06-20 11:12:42 -07:00
Camelid
27cc7c7d9f Clean up 2020-06-20 11:12:42 -07:00
Camelid
1d2acdf8ec Use Vec<Span> instead of Option<Vec<Span>> 2020-06-20 11:12:42 -07:00
Camelid
e61411673c Update tests 2020-06-20 11:12:42 -07:00
Camelid
c883fa45d3 Allow multiple asm! options 2020-06-20 10:42:49 -07:00
Jon Gjengset
386114bfd3
Revise according to review 2020-06-20 10:55:39 -04:00
Jon Gjengset
ad7fd6265e
Doctests need feature 2020-06-20 10:53:39 -04:00
Jon Gjengset
3ff5879f8d
core/time: Add Duration methods for zero
This patch adds two methods to `Duration`. The first, `Duration::zero`,
provides a `const` constructor for getting an zero-length duration. This
is also what `Default` provides (this was clarified in the docs), though
`default` is not `const`.

The second, `Duration::is_zero`, returns true if a `Duration` spans no
time (i.e., because its components are all zero). Previously, the way to
do this was either to compare both `as_secs` and `subsec_nanos` to 0, to
compare against `Duration::new(0, 0)`, or to use the `u128` method
`as_nanos`, none of which were particularly elegant.
2020-06-20 10:53:39 -04:00
Ralf Jung
bb0016bdec
Rollup merge of #73543 - GuillaumeGomez:cleanup-e0695, r=Dylan-DPC
Clean up E0695 explanation

r? @Dylan-DPC
2020-06-20 16:40:01 +02:00
Ralf Jung
c1cad70282
Rollup merge of #73539 - LukasKalbertodt:deprecate-vec-remove-item, r=Mark-Simulacrum
Deprecate `Vec::remove_item`

In #40062 we decided to remove that method. In #71834 it was said that we want to deprecate it for a few cycles before removing it. That's what this PR does.
2020-06-20 16:39:59 +02:00
Ralf Jung
96b86ea1a8
Rollup merge of #73471 - raoulstrackx:raoul/fpu_tag_word, r=jethrogb
Prevent attacker from manipulating FPU tag word used in SGX enclave

Insufficient sanitization of the x87 FPU tag word in the trusted enclave runtime allowed unprivileged adversaries in the containing host application to induce incoherent or unexpected results for ABI-compliant compiled enclave application code that uses the x87 FPU.

Vulnerability was disclosed to us by Fritz Alder, Jo Van Bulck, David Oswald and Frank Piessens

cc: @jethrogb
2020-06-20 16:39:57 +02:00
Ralf Jung
7930ee6874
Rollup merge of #73444 - pietroalbini:ci-remove-try-alt, r=Mark-Simulacrum
ci: disable alt build during try builds

The alt build is not actually needed often, and it can be added back on a case-by-case basis if a specific PR needs access to it.

This will free up a builder.

r? @Mark-Simulacrum
2020-06-20 16:39:55 +02:00
Ralf Jung
91bd3337e3
Rollup merge of #73404 - ajpaverd:cfguard_syntax, r=Mark-Simulacrum
Update CFGuard syntax

Update the naming and syntax of the control-flow-guard option, as discussed in #68793.

r? @Mark-Simulacrum
2020-06-20 16:39:53 +02:00
Ralf Jung
77efcab0f2
Rollup merge of #73171 - tblah:riscv-qemu-test, r=pietroalbini
RISC-V Emulated Testing

Adds a disabled docker image on which to run RISC-V tests. Based on the armhf image.

Test using
```
./src/ci/docker/run.sh riscv64gc-linux
```

cc: @msizanoen1
2020-06-20 16:39:51 +02:00
Ralf Jung
913aac8ac2
Rollup merge of #73058 - tmiasko:aarch64-san, r=nagisa
Support sanitizers on aarch64-unknown-linux-gnu
2020-06-20 16:39:49 +02:00
Ralf Jung
b015b28359
Rollup merge of #73055 - lcnr:skol-no-more, r=matthewjasper
remove leftover mentions of `skol` and `int` from the compiler

This PR mostly changes `skol` -> `placeholder` and all cases where `int` is used as a type to `i32`.
2020-06-20 16:39:47 +02:00
Ralf Jung
5431ef6530
Rollup merge of #72600 - Aaron1011:fix/anon-const-encoding, r=varkor
Properly encode AnonConst into crate metadata

Fixes #68104

Previous, we were encoding AnonConst as a regular Const, causing us to
treat them differently after being deserialized in another compilation
session.
2020-06-20 16:39:45 +02:00
Matthew Jasper
5e8c9f4fae Explain what the substs we're creating are 2020-06-20 14:34:51 +01:00
Matthew Jasper
db4826dd6c Move bounds on associated types to the type
Given `trait X { type U; }` the bound `<Self as X>::U` now lives
on the type, rather than the trait. This is feature gated on
`feature(generic_associated_types)` for now until more testing can
be done.

The also enabled type-generic associated types since we no longer
need "implies bounds".
2020-06-20 14:34:51 +01:00
Matthew Jasper
9818bc08d3 Don't set STILL_FURTHER_SPECIALIZABLE for regions/bound variables 2020-06-20 14:34:50 +01:00
Matthew Jasper
d660dbc630 Check associated type satisfy their bounds
This was currently only happening due to eager normalization, which
isn't possible if there's specialization or bound variables.
2020-06-20 14:34:50 +01:00
Oliver Scherer
98e97a46e2 Address review comments 2020-06-20 14:58:15 +02:00
Oliver Scherer
53686b91ca Satisfy tidy 2020-06-20 14:15:36 +02:00
Oliver Scherer
9e88b48133 Refer just to the issue in the raw ptr cmp diagnostic instead of explaining everything in the diagnostic 2020-06-20 14:09:07 +02:00
marmeladema
13104ef1c5 Pre-compute def_id_to_hir_id table 2020-06-20 13:02:05 +01:00
Donough Liu
f1e07103d3 Prevent incorrect help message for dereference suggestion 2020-06-20 20:00:36 +08:00
Ralf Jung
5eaee0d887 update Miri 2020-06-20 13:33:47 +02:00
Guillaume Gomez
59d8c4549a Clean up E0695 explanation 2020-06-20 13:28:01 +02:00
Matthew Jasper
04e589ced8 Consider fewer predicates for projection candidates
We now require that projection candidates are applicable with the
idenitity substs of the trait, rather than allowing predicates that are
only applicable for certain substs.
2020-06-20 12:13:21 +01:00
Matthew Jasper
29272fc514 Correctly handle binders inside trait predicates 2020-06-20 12:13:20 +01:00
David Wood
2e781ddacc
lint: normalize projections using opaque types
This commit normalizes projections which contain opaque types (opaque types
are otherwise linted against, which is would have previously made the
test cases added in this commit fail).

Signed-off-by: David Wood <david@davidtw.co>
2020-06-20 12:07:23 +01:00
Donough Liu
ef68bf3929 Try to suggest dereferences when trait selection failed. 2020-06-20 18:53:59 +08:00
Donough Liu
51555186b6 Decouple Autoderef with FnCtxt and move Autoderef to librustc_trait_selection. 2020-06-20 18:29:13 +08:00
Lukas Kalbertodt
1e6e082039
Remove uses of Vec::remove_item 2020-06-20 12:12:28 +02:00
marmeladema
94817e38e1 Pre-compute hir_id_to_def_id mapping 2020-06-20 11:03:58 +01:00
marmeladema
6a0f1af19d Remove HirId to NodeId conversion APIs 2020-06-20 11:03:58 +01:00
marmeladema
a98f35f503 Remove NodeId to HirId conversion APIs 2020-06-20 11:03:57 +01:00
marmeladema
936b6bfa64 Move trait_map into hir::Crate 2020-06-20 11:03:53 +01:00
Lukas Kalbertodt
ef10694d3b
Deprecate Vec::remove_item 2020-06-20 11:09:53 +02:00
Bastian Kauschke
180334c7a8 remove pop_placeholders 2020-06-20 10:58:05 +02:00
Bastian Kauschke
a24c8977ee int -> i32 2020-06-20 10:49:43 +02:00
Bastian Kauschke
c4840db8fc skol -> placeholder 2020-06-20 10:43:16 +02:00
Tomasz Miąsko
66e7a145e8 bootstrap: Factor out common code in supported_sanitizers 2020-06-20 09:48:14 +02:00
Tomasz Miąsko
d2e6e9373b ci: Enable sanitizers on dist-aarch64-linux 2020-06-20 09:48:14 +02:00
Tomasz Miąsko
a3e88beffa bootstrap: Build sanitizer runtimes for aarch64-unknown-linux-gnu 2020-06-20 09:48:14 +02:00
Tomasz Miąsko
2851c9ffb5 Support sanitizers on aarch64-unknown-linux-gnu 2020-06-20 09:48:14 +02:00
Rakshith Ravi
0624a5a063 Squashed all commits 2020-06-20 13:00:16 +05:30
jumbatm
556b7baca2 Update existing test cases.
- Allow ClashingExternDecl for lint-dead-code-3
- Update test case for #5791
- Update test case for #1866
- Update extern-abi-from-macro test case
2020-06-20 16:54:32 +10:00
jumbatm
8f079522e4 Add clashing-extern-fn.rs stderr. 2020-06-20 16:54:32 +10:00