Commit Graph

101306 Commits

Author SHA1 Message Date
Esteban Küber
0baf61bfdb Increase spacing for suggestions in diagnostics
Make the spacing between the code snippet and verbose structured
suggestions consistent with note and help messages.
2019-10-24 12:26:01 -07:00
Mark Mansi
1a93bc5c35 remove the last remaining READMEs 2019-10-24 13:32:54 -05:00
Mazdak Farrokhzad
fd6795b46a
Rollup merge of #65766 - alexcrichton:less-inline-hashbrown, r=Mark-Simulacrum
Update hashbrown to 0.6.2

Pulls in rust-lang/hashbrown#119 which should be a good improvement for
compile times of hashmap-heavy crates.
2019-10-24 20:20:10 +02:00
Mazdak Farrokhzad
7b3896fdf2
Rollup merge of #65755 - estebank:icicle, r=davidtwco
Avoid ICE when adjusting bad self ty

Fix #65611.
2019-10-24 20:20:08 +02:00
Mazdak Farrokhzad
1b0367146a
Rollup merge of #65753 - csmoe:derive_fold, r=Centril
Don't assert for different instance on impl trait alias

Closes https://github.com/rust-lang/rust/issues/65679
r? @Centril @nikomatsakis
2019-10-24 20:20:07 +02:00
Mazdak Farrokhzad
1e4a2ee6d5
Rollup merge of #65746 - estebank:newcomer-format, r=Centril
Tweak format string error to point at arguments always

Add secondary span labels with no text to make it clear when there's a
mismatch bewteen the positional arguments in a format string and the
arguments to the macro. This shouldn't affect experienced users, but it
should make it easier for newcomers to more clearly understand how
`format!()` and `println!()` are supposed to be used.

```
error: 2 positional arguments in format string, but there is 1 argument
 --> file8.rs:2:14
  |
2 |     format!("{} {}", 1);
  |              ^^ ^^   -
```

instead of

```
error: 2 positional arguments in format string, but there is 1 argument
 --> file8.rs:2:14
  |
2 |     format!("{} {}", 1);
  |              ^^ ^^
```

r? @Centril
2019-10-24 20:20:05 +02:00
Mazdak Farrokhzad
efa50378d5
Rollup merge of #65729 - Wind-River:master_003, r=alexcrichton
Update test cases for vxWorks
2019-10-24 20:20:04 +02:00
Mazdak Farrokhzad
0da94a45e9
Rollup merge of #65710 - ehuss:update-cargo, r=alexcrichton
Update cargo

6 commits in 3a9abe3f065554a7fbc59f440df2baba4a6e47ee..3ba5f27170db10af7a92f2b682e049397197b8fa
2019-10-15 15:55:35 +0000 to 2019-10-22 15:05:18 +0000
- Fix typo in `cargo install --profile` help (rust-lang/cargo#7532)
- Use stricter -Z flag parsing. (rust-lang/cargo#7531)
- Set timestamp on generated files in archive to now (rust-lang/cargo#7523)
- Support rustc's `-Z panic-abort-tests` in Cargo (rust-lang/cargo#7460)
- rustfmt for nightly changes. (rust-lang/cargo#7526)
- Allow --all-features in root of virtual workspace. (rust-lang/cargo#7525)
2019-10-24 20:20:02 +02:00
Mazdak Farrokhzad
9c04bd1b4d
Rollup merge of #65627 - varkor:const-generics-forbid-non-structural_match, r=petrochenkov
Forbid non-`structural_match` types in const generics

Fixes https://github.com/rust-lang/rust/issues/60286.
2019-10-24 20:20:01 +02:00
Mazdak Farrokhzad
cdb7634f0c
Rollup merge of #65625 - petrochenkov:cstore, r=Mark-Simulacrum,Zoxc
Turn crate store into a resolver output

Crate store (`CStore`) is a vector of data (`CrateMetadata`) associated with extern crates loaded during the current compilation session.

All crates are loaded in the resolver when resolving either paths pointing to extern prelude or `extern crate` items. (There are also a couple of crates like panic runtime that are loaded kind of like implicit `extern crate`s, but that also happens in resolve.)

The use of `CStore` from `rustc_plugin` (which is outside of the resolver) was unnecessary because legacy plugins are not added to the crate store and don't use `CrateNum`s.

So, `CStore` can be produced by the resolver instead of being kept in some really global data (`rustc_interface::Compiler`) like now.

As a result of crate store being more "local" we can now remove some locks and `Lrc`s.
2019-10-24 20:19:59 +02:00
Vadim Petrochenkov
94216ce3ad rustc_interface: Remove ExpansionResult and some Steals 2019-10-24 21:12:05 +03:00
Vadim Petrochenkov
9f5a530b84 rustc_metadata: Minimize use of Lrc in crate store
Crate metadatas are still stored as `Lrc<CrateMetadata>` in `CStore` because crate store has to be cloneable due to `Resolver::clone_outputs`.
2019-10-24 20:54:16 +03:00
Vadim Petrochenkov
c5fee33e7a rustc_metadata: Remove RwLock from CStore 2019-10-24 20:54:16 +03:00
Vadim Petrochenkov
3534ca8f49 Turn crate store into a resolver output 2019-10-24 20:54:16 +03:00
Vadim Petrochenkov
5fd796ad06 rustc: Combine resolver outputs into a single struct 2019-10-24 20:51:33 +03:00
Vadim Petrochenkov
fb353f050a resolve: Privatize all resolver fields 2019-10-24 20:51:33 +03:00
Vadim Petrochenkov
222503a354 rustc: Add a convenience alias for dyn MetadataLoader + Sync 2019-10-24 20:51:33 +03:00
Vadim Petrochenkov
175d325ccb rustc_metadata: Move some code around
Plugin search doesn't need a crate loader, only crate locator
2019-10-24 20:51:33 +03:00
Vadim Petrochenkov
2cda75c48f rustc_metadata: Remove unnecessary use of crate store in plugin loader 2019-10-24 20:51:33 +03:00
Vadim Petrochenkov
2c16f84490 rustc_driver: Remove unnecessary use of crate store 2019-10-24 20:50:11 +03:00
csmoe
184a61f0bf Don't assert for different instance on impl trait alias 2019-10-25 01:15:37 +08:00
bors
10a52c25ca Auto merge of #65762 - mati865:msys2-bug, r=pietroalbini
workaround msys2 bug
2019-10-24 16:08:03 +00:00
Mateusz Mikuła
2fea52511e workaround msys2 bug
Co-Authored-By: Pietro Albini <pietro@pietroalbini.org>
2019-10-24 18:03:01 +02:00
Guanqun Lu
5defe06f96 reorder TomlTarget struct's fields based on the order in config.toml.example 2019-10-24 23:54:31 +08:00
Guanqun Lu
2c93fd2cb6 reorder Rust struct's fields based on the order in config.toml.example 2019-10-24 23:53:45 +08:00
Guanqun Lu
e1e60c339a reorder Install struct's fields based on the order in config.toml.example 2019-10-24 23:51:02 +08:00
Guanqun Lu
945223128a reorder Build struct's fields based on the order in config.toml.example 2019-10-24 23:50:03 +08:00
Guanqun Lu
a90954163b reorder Llvm struct's fields based on the order in config.toml.example 2019-10-24 23:46:05 +08:00
Guanqun Lu
2f7e3d55c9 add the missing rust.musl-root option in config.toml.example 2019-10-24 23:43:06 +08:00
Guanqun Lu
9adea61777 add a WARNING to rust.optimize option in config.toml.example 2019-10-24 23:41:48 +08:00
Manish Goregaokar
7d0162d7ed Update clippy 2019-10-24 08:15:32 -07:00
Michael Woerister
ee1173a8ff self-profiling: Update measureme to 0.4.0 and use new RAII-based API. 2019-10-24 17:14:38 +02:00
Michael Woerister
f6aa64b7b0 self-profiling: Remove unused methods from profiler. 2019-10-24 17:13:38 +02:00
Alex Crichton
060b6cbe74 Update hashbrown to 0.6.2
Pulls in rust-lang/hashbrown#119 which should be a good improvement for
compile times of hashmap-heavy crates.
2019-10-24 08:07:03 -07:00
Sydney Acksman
4cfcb77084 Changed APIT with explicit generic args span to specific arg spans 2019-10-24 09:47:26 -05:00
Lukas Kalbertodt
c36b9ddcb4
Add UI tests for array::IntoIter impls
This it to make sure traits are implemented for arrays with length 32
and below, while they are not implemented for >= 33.
2019-10-24 15:46:44 +02:00
Lukas Kalbertodt
5334a307d5
Add unit tests for array::IntoIter
Many tests are based on tests by Josh Stone <cuviper@gmail.com>
2019-10-24 15:46:44 +02:00
Lukas Kalbertodt
a2e94ca1ee
Add array::IntoIter as a consuming/by-value array iterator
The iterator is implemented using const generics. It implements the
traits `Iterator`, `DoubleEndedIterator`, `ExactSizeIterator`,
`FusedIterator` and `TrustedLen`. It also contains a public method
`new` to create it from an array.

`IntoIterator` was not implemented for arrays yet, as there are still
some open questions regarding backwards compatibility. This commit
only adds the iterator impl and does not yet offer a convenient way
to obtain that iterator.
2019-10-24 15:46:44 +02:00
Esteban Küber
18d873e8f0 Avoid ICE when adjusting bad self ty 2019-10-24 00:41:14 -07:00
bors
8e0007f829 Auto merge of #65474 - Mark-Simulacrum:rustc-dev-split, r=pietroalbini
Split the rustc target libraries into separate rustc-dev component

This is re-applies a squashed version of #64823 as well as including #65337 to fix bugs noted after merging the first PR.

The second PR is confirmed as fixing windows-gnu, and presumably also fixes other platforms, such as musl (i.e. #65335 should be fixed); `RUSTUP_DIST_SERVER=https://dev-static.rust-lang.org rustup toolchain install nightly-2019-10-16` can be installed to confirm that this is indeed the case.
2019-10-24 07:27:00 +00:00
wangxiangqing
b1331563ba Deprecated proc_macro doesn't trigger warning on build library
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
2019-10-24 14:14:51 +08:00
bors
55e00631e5 Auto merge of #65733 - Centril:rollup-0zth66f, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #64178 (More Clippy fixes for alloc, core and std)
 - #65144 (Add Cow::is_borrowed and Cow::is_owned)
 - #65193 (Lockless LintStore)
 - #65479 (Add the `matches!( $expr, $pat ) -> bool` macro)
 - #65518 (Avoid ICE when checking `Destination` of `break` inside a closure)
 - #65583 (rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.)
 - #65641 (Derive `Rustc{En,De}codable` for `TokenStream`.)
 - #65648 (Eliminate `intersect_opt`.)
 - #65657 (Remove `InternedString`)
 - #65691 (Update E0659 error code long explanation to 2018 edition)
 - #65696 (Fix an issue with const inference variables sticking around under Chalk + NLL)
 - #65704 (relax ExactSizeIterator bound on write_bytes)

Failed merges:

r? @ghost
2019-10-24 03:38:57 +00:00
Esteban Küber
8467ceff22 Tweak format string error to point at arguments always
Add secondary span labels with no text to make it clear when there's a
mismatch bewteen the positional arguments in a format string and the
arguments to the macro. This shouldn't affect experienced users, but it
should make it easier for newcomers to more clearly understand how
`format!()` and `println!()` are supposed to be used.

```
error: 2 positional arguments in format string, but there is 1 argument
 --> file8.rs:2:14
  |
2 |     format!("{} {}", 1);
  |              ^^ ^^   -
```

instead of

```
error: 2 positional arguments in format string, but there is 1 argument
 --> file8.rs:2:14
  |
2 |     format!("{} {}", 1);
  |              ^^ ^^
```
2019-10-23 17:32:33 -07:00
Mazdak Farrokhzad
822f787546 Adjust the tracking issue for untagged_unions.
Also elaborate on some feature gates in `active.rs`.
2019-10-24 02:24:14 +02:00
Eduard-Mihai Burtescu
d717806363 rustc_typeck: don't record direct callees in generator_interior. 2019-10-24 01:58:25 +03:00
Mazdak Farrokhzad
15a6c09b6e pre-expansion gate type_ascription 2019-10-24 00:32:03 +02:00
Mazdak Farrokhzad
e4ed886578 pre-expansion gate box_syntax 2019-10-24 00:32:03 +02:00
Mazdak Farrokhzad
137ded8ab1 pre-expansion gate label_break_value 2019-10-24 00:32:03 +02:00
Mazdak Farrokhzad
66995a6a71 dedup GAT gate checks 2019-10-24 00:32:03 +02:00
Mazdak Farrokhzad
1935ba658c pre-expansion gate try_blocks 2019-10-24 00:32:03 +02:00