Commit Graph

122966 Commits

Author SHA1 Message Date
Camelid
b00b1a4598 Use span_suggestion instead of span_label 2020-06-20 11:12:43 -07:00
Camelid
e8be7971d1 Use bitflags function instead of custom one 2020-06-20 11:12:43 -07:00
Camelid
c7da50d23f Get option name from symbol instead of snippet 2020-06-20 11:12:43 -07:00
Camelid
7c5b66f328 Update duplicate options test 2020-06-20 11:12:43 -07:00
Camelid
ac54265b13 Use span_label 2020-06-20 11:12:43 -07:00
Camelid
b94b7e7f1b Make warning an error; use help instead of suggestion; clean up code
For some reason, the help message is now in a separate message, which
adds a lot of noise. I would like to try to get it back to one message.
2020-06-20 11:12:42 -07:00
Camelid
7aaadb69e4 Add UI test for duplicate asm! options warning 2020-06-20 11:12:42 -07:00
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
Tshepang Lekhonkhobe
16e741c8e9 explain the logic a bit 2020-06-20 13:22:13 +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
Tshepang Lekhonkhobe
1b47e8fa99 examples should be of type bool 2020-06-20 10:56:47 +02:00