about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-10-25Rollup merge of #65731 - fusion-engineering-forks:set-extension, r=dtolnayMazdak Farrokhzad-11/+15
Prevent unnecessary allocation in PathBuf::set_extension. It was allocating a new `OsString` that was immediately dropped after using it with `set_file_name`. Now it directly changes the extension in the original buffer, without touching the rest of the file name or allocating a temporary string.
2019-10-25Rollup merge of #65685 - oxalica:statx-eperm, r=alexcrichtonMazdak Farrokhzad-42/+55
Fix check of `statx` and handle EPERM Should fix #65662 https://github.com/rust-lang/rust/issues/65662#issuecomment-544593939 > I think a reasonable solution might be to do something like try to stat AT_CWD initially and if that fails with EPERM or ENOSYS we disable the syscall entirely, otherwise it's cached as always good to use. r? @alexcrichton
2019-10-25Rollup merge of #65315 - spastorino:intern-place-projection, r=oli-obkMazdak Farrokhzad-1057/+1147
Intern place projection This should sit on top of https://github.com/rust-lang/rust/pull/65197. After that one merged, I'm gonna rebase on top of it. The important commits are the last three and there's a bunch of code repetition that I'm going to remove but for that I need to refactor some things that probably need to be added before this PR. Anyway this work helps as is because we can run perf tests :). r? @oli-obk /cc @nikomatsakis
2019-10-25Rollup merge of #65074 - Rantanen:json-byte-pos, r=matkladMazdak Farrokhzad-22/+543
Fix the start/end byte positions in the compiler JSON output Track the changes made during normalization in the `SourceFile` and use this information to correct the `start_byte` and `end_byte` fields in the JSON output. This should ensure the start/end byte fields can be used to index the original file, even if Rust normalized the source code for parsing purposes. Both CRLF to LF and BOM removal are handled with this one. The rough plan was discussed with @matklad in rust-lang-nursery/rustfix#176 - although I ended up going with `u32` offset tracking so I wouldn't need to deal with `u32 + i32` arithmetics when applying the offset to the span byte positions. Fixes #65029
2019-10-25Rollup merge of #64639 - davidtwco:rfc-2008-stabilization, r=CentrilMazdak Farrokhzad-155/+30
Stabilize `#[non_exhaustive]` (RFC 2008) Fixes #44109. This pull request stabilizes the `#[non_exhaustive]` attribute, which is used to indicate that a type will have more fields / variants added in the future. It can be applied to `struct`s, `enum`s and `enum` variants. See https://github.com/rust-lang/rust/issues/44109#issuecomment-533356866 for the stabilization report. r? @Centril
2019-10-25RFC 2008: StabilizationDavid Wood-155/+30
This commit stabilizes RFC 2008 (#44109) by removing the feature gate. Signed-off-by: David Wood <david@davidtw.co>
2019-10-25Auto merge of #65764 - Manishearth:clippyup, r=Manishearthbors-21/+16
Update clippy Fixes #65754 r? @ghost
2019-10-25Rollup merge of #65775 - matthewjasper:reempty, r=pnkfelixMazdak Farrokhzad-2/+26
Fix more `ReEmpty` ICEs closes #65553 r? @pnkfelix
2019-10-25Rollup merge of #65763 - ObsidianMinor:diag/65642, r=varkorMazdak Farrokhzad-14/+29
Changed APIT with explicit generic args span to specific arg spans Fixes #65642.
2019-10-25Rollup merge of #65747 - Centril:union-issue-fix, r=varkorMazdak Farrokhzad-8/+16
Adjust the tracking issue for `untagged_unions`. Makes https://github.com/rust-lang/rust/issues/55149 the new tracking issue for `untagged_unions`. Closes https://github.com/rust-lang/rust/issues/32836 which is the old tracking issue. r? @varkor
2019-10-25Rollup merge of #65742 - Centril:gate-pre-expansion-subset, r=davidtwcoMazdak Farrokhzad-182/+295
Pre-expansion gate most of the things This is a subset of https://github.com/rust-lang/rust/pull/64672. A crater run has already been done and this PR implements conclusions according to https://github.com/rust-lang/rust/pull/64672#issuecomment-542703363. r? @davidtwco cc @petrochenkov
2019-10-25Rollup merge of #65666 - XiangQingW:proc_macro, r=petrochenkovMazdak Farrokhzad-0/+27
Deprecated proc_macro doesn't trigger warning on build library Fix #65189
2019-10-25Rollup merge of #65414 - davidtwco:issue-65157-non-exhaustive-always-useful, ↵Mazdak Farrokhzad-49/+75
r=varkor ignore uninhabited non-exhaustive variant fields Fixes #65157. This PR modifies the uninhabitedness checking so that the fields of a non-exhaustive variant (which is not local) are ignored if they are uninhabited. This is an improvement over the previous behaviour which considered all non-local non-exhaustive variants useful because unreachable patterns are now detected. r? @arielb1 cc @varkor
2019-10-25Rollup merge of #65408 - guanqun:remove-rust-optimize, r=Mark-SimulacrumMazdak Farrokhzad-15/+15
reorder config.toml.example options and add one missing option r? @Mark-Simulacrum
2019-10-25Rollup merge of #65390 - GuillaumeGomez:long-err-explanation-E0576, ↵Mazdak Farrokhzad-3/+30
r=matthewjasper,kinnison Add long error explanation for E0576 Part of #61137.
2019-10-25Rollup merge of #62959 - LukasKalbertodt:array-value-iter, r=scottmcmMazdak Farrokhzad-1/+696
Add by-value iterator for arrays This adds an iterator that can iterate over arrays by value, yielding all elements by value. However, **this PR does _not_ add a corresponding `IntoIterator` impl for arrays**. The `IntoIterator` impl needs some discussion about backwards-compatibility that should take place in a separate PR. With this patch, this code should work (but there is currently still a bug): ```rust #![feature(array_value_iter)] use std::array::IntoIter; let arr = [1, 2, 3]; for x in IntoIter::new(arr) { println!("{}", x); } ``` **TODO**: - [x] Get initial feedback - [x] Add tests - [x] Figure out why stage1 produces weird bugs ([comment](https://github.com/rust-lang/rust/pull/62959#issuecomment-516016524)) - [x] Add UI tests as mentioned [here](https://github.com/rust-lang/rust/pull/62959#discussion_r307061894) (will do that soon-ish) - [x] Fix [this new bug](https://github.com/rust-lang/rust/pull/62959#issuecomment-544732159) **Notes for reviewers** - Is the use of `MaybeUninit` correct here? I think it has to be used due to the `Clone` impl which has to fill the dead array elements with something, but cannot fill it with a correct instance. - Are the unit tests sufficient? CC #25725
2019-10-25Auto merge of #65771 - Centril:rollup-upfsvrb, r=Centrilbors-638/+715
Rollup of 8 pull requests Successful merges: - #65625 (Turn crate store into a resolver output) - #65627 (Forbid non-`structural_match` types in const generics) - #65710 (Update cargo) - #65729 (Update test cases for vxWorks) - #65746 (Tweak format string error to point at arguments always) - #65753 (Don't assert for different instance on impl trait alias) - #65755 (Avoid ICE when adjusting bad self ty) - #65766 (Update hashbrown to 0.6.2) Failed merges: r? @ghost
2019-10-24Fix more `ReEmpty` ICEsMatthew Jasper-2/+26
2019-10-24Rollup merge of #65766 - alexcrichton:less-inline-hashbrown, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
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-24Rollup merge of #65755 - estebank:icicle, r=davidtwcoMazdak Farrokhzad-5/+96
Avoid ICE when adjusting bad self ty Fix #65611.
2019-10-24Rollup merge of #65753 - csmoe:derive_fold, r=CentrilMazdak Farrokhzad-2/+18
Don't assert for different instance on impl trait alias Closes https://github.com/rust-lang/rust/issues/65679 r? @Centril @nikomatsakis
2019-10-24Rollup merge of #65746 - estebank:newcomer-format, r=CentrilMazdak Farrokhzad-6/+19
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-24Rollup merge of #65729 - Wind-River:master_003, r=alexcrichtonMazdak Farrokhzad-2/+5
Update test cases for vxWorks
2019-10-24Rollup merge of #65710 - ehuss:update-cargo, r=alexcrichtonMazdak Farrokhzad-0/+0
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-24Rollup merge of #65627 - varkor:const-generics-forbid-non-structural_match, ↵Mazdak Farrokhzad-207/+230
r=petrochenkov Forbid non-`structural_match` types in const generics Fixes https://github.com/rust-lang/rust/issues/60286.
2019-10-24rustc_interface: Remove `ExpansionResult` and some `Steal`sVadim Petrochenkov-28/+14
2019-10-24rustc_metadata: Minimize use of `Lrc` in crate storeVadim Petrochenkov-47/+41
Crate metadatas are still stored as `Lrc<CrateMetadata>` in `CStore` because crate store has to be cloneable due to `Resolver::clone_outputs`.
2019-10-24rustc_metadata: Remove `RwLock` from `CStore`Vadim Petrochenkov-25/+26
2019-10-24Turn crate store into a resolver outputVadim Petrochenkov-100/+102
2019-10-24rustc: Combine resolver outputs into a single structVadim Petrochenkov-50/+41
2019-10-24resolve: Privatize all resolver fieldsVadim Petrochenkov-50/+61
2019-10-24rustc: Add a convenience alias for `dyn MetadataLoader + Sync`Vadim Petrochenkov-10/+12
2019-10-24rustc_metadata: Move some code aroundVadim Petrochenkov-98/+84
Plugin search doesn't need a crate loader, only crate locator
2019-10-24rustc_metadata: Remove unnecessary use of crate store in plugin loaderVadim Petrochenkov-83/+41
2019-10-24rustc_driver: Remove unnecessary use of crate storeVadim Petrochenkov-7/+7
2019-10-25Don't assert for different instance on impl trait aliascsmoe-2/+18
2019-10-24workaround msys2 bugMateusz Mikuła-0/+23
Co-Authored-By: Pietro Albini <pietro@pietroalbini.org>
2019-10-24reorder TomlTarget struct's fields based on the order in config.toml.exampleGuanqun Lu-2/+2
2019-10-24reorder Rust struct's fields based on the order in config.toml.exampleGuanqun Lu-5/+5
2019-10-24reorder Install struct's fields based on the order in config.toml.exampleGuanqun Lu-1/+1
2019-10-24reorder Build struct's fields based on the order in config.toml.exampleGuanqun Lu-4/+4
2019-10-24reorder Llvm struct's fields based on the order in config.toml.exampleGuanqun Lu-3/+3
2019-10-24Update clippyManish Goregaokar-21/+16
2019-10-24Update hashbrown to 0.6.2Alex Crichton-1/+1
Pulls in rust-lang/hashbrown#119 which should be a good improvement for compile times of hashmap-heavy crates.
2019-10-24Changed APIT with explicit generic args span to specific arg spansSydney Acksman-14/+29
2019-10-24Add UI tests for `array::IntoIter` implsLukas Kalbertodt-0/+216
This it to make sure traits are implemented for arrays with length 32 and below, while they are not implemented for >= 33.
2019-10-24Add unit tests for `array::IntoIter`Lukas Kalbertodt-1/+207
Many tests are based on tests by Josh Stone <cuviper@gmail.com>
2019-10-24Add `array::IntoIter` as a consuming/by-value array iteratorLukas Kalbertodt-0/+273
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-24Avoid ICE when adjusting bad self tyEsteban Küber-5/+96
2019-10-24Auto merge of #65474 - Mark-Simulacrum:rustc-dev-split, r=pietroalbinibors-55/+173
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.