Commit Graph

109634 Commits

Author SHA1 Message Date
bors
2acf32d9ad Auto merge of #70483 - Centril:rollup-slli4yf, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #70345 (Remove `no_integrated_as` mode.)
 - #70434 (suggest `;` on expr `mac!()` which is good as stmt `mac!()`)
 - #70457 (non-exhastive diagnostic: add note re. scrutinee type)
 - #70478 (Refactor type_of for constants)
 - #70480 (clarify hir_id <-> node_id method names)

Failed merges:

r? @ghost
2020-03-28 00:36:57 +00:00
Mark Rousskov
ad679a7f43 Update the documentation comment 2020-03-27 19:02:23 -04:00
Mark Rousskov
b6bc906004 Remove separate encoding for a single nonzero-mapping byte
In practice, for the two data sets that still use the bitset encoding (uppercase
and lowercase) this is not a significant win, so just drop it entirely. It costs
us about 5 bytes, and the complexity is nontrivial.
2020-03-27 19:02:23 -04:00
Mark Rousskov
9c1ceece20 Add skip list based implementation for smaller encoding
This arranges for the sparser sets (everything except lower and uppercase) to be
encoded in a significantly smaller context. However, it is also a performance
trade-off (roughly 3x slower than the bitset encoding). The 40% size reduction
is deemed to be sufficiently important to merit this performance loss,
particularly as it is unlikely that this code is hot anywhere (and if it is,
paying the memory cost for a bitset that directly represents the data seems
worthwhile).

Alphabetic     : 1599 bytes     (- 937 bytes)
Case_Ignorable : 949 bytes      (- 822 bytes)
Cased          : 359 bytes      (- 429 bytes)
Cc             : 9 bytes        (-  15 bytes)
Grapheme_Extend: 813 bytes      (- 675 bytes)
Lowercase      : 863 bytes
N              : 419 bytes      (- 619 bytes)
Uppercase      : 776 bytes
White_Space    : 37 bytes       (-  46 bytes)
Total table sizes: 5824 bytes   (-3543 bytes)
2020-03-27 19:02:23 -04:00
Matthias Krüger
6e01d0fdad submodules: update clippy from 1ff81c1b to 70b93aab
Changes:
````
remove redundant import
rustup https://github.com/rust-lang/rust/pull/68404
rustup https://github.com/rust-lang/rust/pull/69644
rustup https://github.com/rust-lang/rust/pull/70344
Move verbose_file_reads to restriction
move redundant_pub_crate to nursery
readme: explain how to run only a single lint on a codebase
Remove dependency on `matches` crate
Move useless_transmute to nursery
nursery group -> style
Update for PR feedback
Auto merge of #5314 - ehuss:remove-git2, r=flip1995
Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them
````

Fixes #70456
2020-03-27 23:43:22 +01:00
Bastian Kauschke
b3d744c9f5 add unused_braces, lint anon_const 2020-03-27 22:50:48 +01:00
Bastian Kauschke
e0a08351a2 add visit_anon_const to EarlyContextAndPass 2020-03-27 22:50:48 +01:00
Mazdak Farrokhzad
a023e6121f
Rollup merge of #70480 - lcnr:appayupyup, r=eddyb
clarify hir_id <-> node_id method names

resolves 2 FIXME.

r? @eddyb
2020-03-27 22:39:42 +01:00
Mazdak Farrokhzad
5b68f9c46a
Rollup merge of #70478 - lcnr:refactor-type_of, r=varkor
Refactor type_of for constants

If I have to look at this function for a few hours I want it to at least look good.

r? @varkor
2020-03-27 22:39:41 +01:00
Mazdak Farrokhzad
23d3fa266c
Rollup merge of #70457 - Centril:non-exhaustive-scrutinee-type, r=estebank
non-exhastive diagnostic: add note re. scrutinee type

This fixes https://github.com/rust-lang/rust/issues/67259 by adding a note:
```
    = note: the matched value is of type &[i32]
```
to non-exhaustive pattern matching errors.

r? @varkor @estebank
2020-03-27 22:39:39 +01:00
Mazdak Farrokhzad
cfe1e330b5
Rollup merge of #70434 - Centril:fix-34421, r=estebank
suggest `;` on expr `mac!()` which is good as stmt `mac!()`

Fixes https://github.com/rust-lang/rust/issues/34421 by implementing @jseyfried's suggestion in https://github.com/rust-lang/rust/issues/34421#issuecomment-301578683.

r? @petrochenkov
2020-03-27 22:39:38 +01:00
Mazdak Farrokhzad
08e867cc3a
Rollup merge of #70345 - nnethercote:rm-no_integrated_as, r=alexcrichton
Remove `no_integrated_as` mode.

Specifically, remove both `-Z no_integrated_as` and
`TargetOptions::no_integrated_as`. The latter was only used for the
`msp430_none_elf` platform, for which it's no longer required.

r? @alexcrichton
2020-03-27 22:39:37 +01:00
bors
0bf7c2ad77 Auto merge of #70162 - cjgillot:split_query, r=Zoxc
Move the query system to a dedicated crate

The query system `rustc::ty::query` is split out into the `rustc_query_system` crate.

Some commits are unformatted, to ease rebasing.

Based on #67761 and #69910.

r? @Zoxc
2020-03-27 21:36:51 +00:00
Mazdak Farrokhzad
42c5cfdfda add the label back but make it shorter 2020-03-27 21:52:09 +01:00
Jeremy Fitzhardinge
53c4e0c19a Implement -Zlink-native-libraries
This implements a flag `-Zlink-native-libraries=yes/no`. If set to true/yes, or unspecified, then
native libraries referenced via `#[link]` attributes will be put on the linker line (ie, unchanged
behaviour).

If `-Zlink-native-libraries=no` is specified then rustc will not add the native libraries to the link
line. The assumption is that the outer build system driving the build already knows about the native
libraries and will specify them to the linker directly (for example via `-Clink-arg=`).

Addresses issue #70093
2020-03-27 11:57:05 -07:00
Ana-Maria Mihalache
50d2c3abd5 Rename TyLayout to TyAndLayout. 2020-03-27 17:14:53 +00:00
bors
75208942f6 Auto merge of #70474 - Dylan-DPC:rollup-0lsxmmk, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #65222 (Proposal: `fold_self` and `try_fold_self` for Iterators)
 - #69887 (clean up E0404 explanation)
 - #70068 (use "gcc" instead of "cc" on *-sun-solaris systems when linking)
 - #70470 (Clean up E0463 explanation)

Failed merges:

r? @ghost
2020-03-27 16:09:48 +00:00
Bastian Kauschke
c339b2eb4a refactor type_of for consts 2020-03-27 16:44:40 +01:00
Bastian Kauschke
37603f499a clarify hir_id <-> node_id method names 2020-03-27 16:43:20 +01:00
Ralf Jung
2a1e61e2d6 avoid creating unnecessary reference in Windows Env iterator 2020-03-27 16:34:15 +01:00
PankajChaudhary5
c09b5a3ed3 Refactor changes 2020-03-27 20:00:49 +05:30
Dylan DPC
3de5a892ac
Rollup merge of #70470 - GuillaumeGomez:cleanup-e0463, r=Dylan-DPC
Clean up E0463 explanation

r? @Dylan-DPC
2020-03-27 15:09:59 +01:00
Dylan DPC
4d079a8dd2
Rollup merge of #70068 - jclulow:illumos-gcc, r=cramertj
use "gcc" instead of "cc" on *-sun-solaris systems when linking

On illumos and Solaris systems, Rust will use GCC as the link editor.
Rust does this by invoking "cc", which on many (Linux and perhaps BSD)
systems is generally either GCC or a GCC-compatible front-end.  On
historical Solaris systems, "cc" was often the Sun Studio compiler.
This history casts a long shadow, and as such, even most modern
illumos-based operating systems tend to install GCC as "gcc", without
also making it available as "cc".

We should invoke GCC as "gcc" on such systems to ensure we get the right
compiler driver.
2020-03-27 15:09:57 +01:00
Dylan DPC
6b6c470bee
Rollup merge of #69887 - GuillaumeGomez:cleanup-e0404, r=Dylan-DPC
clean up E0404 explanation

r? @Dylan-DPC
2020-03-27 15:09:54 +01:00
Dylan DPC
87fdf35572
Rollup merge of #65222 - Lucretiel:fold_self, r=kodrAus
Proposal: `fold_self` and `try_fold_self` for Iterators

This pull request proposes & implements two new methods on Iterators: `fold_self` and `try_fold_self`. These are variants of `fold` and `try_fold` that use the first element in the iterator as the initial accumulator.

Let me know if a public feature like this requires an RFC, or if this pull request is sufficient as place for discussion.
2020-03-27 15:09:48 +01:00
Guillaume Gomez
88100baa2c clean up E0404 explanation 2020-03-27 15:04:16 +01:00
PankajChaudhary5
0d90612952 Refactor changes 2020-03-27 19:16:32 +05:30
bors
0a2df62073 Auto merge of #69916 - oli-obk:mir_bless, r=eddyb
Enable blessing of mir opt tests

cc @rust-lang/wg-mir-opt
cc @RalfJung

Long overdue, but now you can finally just add a

```rust
// EMIT_MIR rustc.function_name.MirPassName.before.mir
```

(or `after.mir` since most of the time you want to know the MIR after a pass). A `--bless` invocation will automatically create the files for you.

I suggest we do this for all mir opt tests that have all of the MIR in their source anyway

If you use `rustc.function.MirPass.diff` you only get the diff that the MIR pass causes on the MIR.

Fixes #67865
2020-03-27 12:58:34 +00:00
Guillaume Gomez
346bc41086 Clean up E0463 explanation 2020-03-27 13:35:00 +01:00
bors
697d6b3f3f Auto merge of #70282 - ssomers:btreemap_gdb_pretty_print, r=Mark-Simulacrum
Test and fix gdb pretty printing more

Over time I had oversimplified the test case for #68098: it does not have an internal node to print so it did not test what it pretended to test. And then I also realized not spotting the same mistake reviewing #70111, and more likely to occur in the wild. Now, both test cases fail if you put back the flawed python code.

r? @Mark-Simulacrum
2020-03-27 09:54:02 +00:00
Mazdak Farrokhzad
2ddc35997c address some review comments 2020-03-27 09:29:38 +01:00
Camille GILLOT
2d7bbda966 Implement HashStable directly. 2020-03-27 08:33:37 +01:00
Camille GILLOT
222d010255 Cleanups. 2020-03-27 07:50:28 +01:00
Camille GILLOT
db5be1fe20 Move QueryContext to the parent module. 2020-03-27 07:43:11 +01:00
Mazdak Farrokhzad
2972bb37b8 parse: improve recovery for assoc eq constraints. 2020-03-27 07:39:15 +01:00
Mazdak Farrokhzad
f91de44d07 extract parse_generic_arg 2020-03-27 07:39:15 +01:00
Mazdak Farrokhzad
aa4999ec69 parse_angle_arg: parse constraints first 2020-03-27 07:39:14 +01:00
Mazdak Farrokhzad
abce4881e0 split parse_angle_args into loop / single step 2020-03-27 07:39:14 +01:00
Mazdak Farrokhzad
91194f795c parse: move constraint/arg restriction to ast_validation. 2020-03-27 07:39:14 +01:00
Camille GILLOT
4faf701d20 Remove the QueryGetter trait. 2020-03-27 07:35:32 +01:00
bors
b9ac29169a Auto merge of #69470 - mati865:deps, r=Mark-Simulacrum
Upgrade rustc and bootstrap dependencies
2020-03-27 06:31:49 +00:00
Mazdak Farrokhzad
6c643a070c suggest semi on expr mac!() good as stmt mac!(). 2020-03-27 07:02:50 +01:00
Mazdak Farrokhzad
c858593ed0 non-exhastive diagnostic: add note re. scrutinee type 2020-03-27 06:49:07 +01:00
PankajChaudhary5
28fe986ae3 fix suggested changes 2020-03-27 09:53:16 +05:30
bors
6c19a10e24 Auto merge of #68404 - Amanieu:llvm-asm, r=estebank
Rename asm! to llvm_asm!

As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850.

This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
2020-03-27 03:27:09 +00:00
dylan_DPC
268408f495 remove unused import 2020-03-27 03:21:15 +01:00
dylan_DPC
7e7c2f19a3 simplify test 2020-03-27 02:45:56 +01:00
Nicholas Nethercote
02840ca8ab Remove no_integrated_as mode.
Specifically, remove both `-Z no_integrated_as` and
`TargetOptions::no_integrated_as`. The latter was only used for the
`msp430_none_elf` platform, for which it's no longer required.
2020-03-27 11:59:10 +11:00
bors
7b73d14b0b Auto merge of #70451 - Dylan-DPC:rollup-2g9oyht, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #69644 (Remove framework in `dataflow/mod.rs` in favor of "generic" one)
 - #69936 (Fix cycle error when emitting suggestion for mismatched `fn` type)
 - #70048 (Allow obtaining &mut OsStr)
 - #70344 (Decouple `rustc_hir::print` into `rustc_hir_pretty`)
 - #70435 (Add regression test for #66706)

Failed merges:

r? @ghost
2020-03-27 00:25:26 +00:00
Dylan DPC
fa15774a4b
Rollup merge of #70435 - Alexendoo:test-66706, r=Centril
Add regression test for #66706

Adds the two cases that no longer ICE (https://github.com/rust-lang/rust/issues/66706#issuecomment-604098436)
2020-03-27 01:23:55 +01:00