When moving the script out of CI configuration and into a proper script
we lost track of the current directory changing (and as such the
parameters of the script needing to be different now).
bors [Sun, 22 Dec 2019 10:30:51 +0000 (10:30 +0000)]
Auto merge of #66931 - cjgillot:hirene-preamble, r=eddyb
Allocate HIR on an arena 1/4
This PR is the first in a series of 4, aiming at allocating the HIR on an arena, as a memory optimisation.
1. This first PR lays the groundwork and migrates some low-hanging fruits.
2. The second PR will migrate `hir::Expr`, `hir::Pat` and related.
3. The third PR will migrate `hir::Ty` and related.
4. The final PR will be dedicated to eventual cleanups.
In order to make the transition as gradual as possible, some lowering routines receive `Box`-allocated data and move it into the arena. This is a bit wasteful, but hopefully temporary.
Nonetheless, special care should be taken to avoid double arena allocations.
Rollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=Centril
Require issue = "none" over issue = "0" in unstable attributes
These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler.
Notes:
- #66299 is now in beta so `issue = "none"` is accepted.
- The `tidy` tool now fails on `issue = "0"`.
- Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used.
- The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated.
Rollup merge of #67439 - Centril:clean-hair-slice, r=matthewjasper
Cleanup `lower_pattern_unadjusted` & Improve slice pat typeck
Following up on https://github.com/rust-lang/rust/pull/67318, in this PR, the HAIR lowering of patterns (`lower_pattern_unadjusted`) is cleaned up with a focus on slice patterns (in particular, some dead code is removed). Moreover, `check_pat_slice` is refactored some more.
Revamp how `// run-fail` tests work internally by having a separate `FailMode` that does not interfere with `PassMode`. In particular, `--pass check` will now have no effect on `// *-fail` tests. Moreover, new test annotations `// check-fail` (the default) and `// build-fail` are added. The latter is useful to distinguish post-monomorphization failures from pre-monomorphization failures as seen throughout the PR. Finally, ensure that non-`Ui` tests do not listen to `--pass check` such that the flag can be used with e.g. `./x.py test --pass check` directly.
Rollup merge of #67489 - Mark-Simulacrum:drop-petgraph, r=Centril
Drop petgraph dependency from bootstrap
It was essentially unused, likely leftover from a previous refactoring iteration. This should hopefully help reduce bootstrap build times a little, dropping petgraph, fixedbitset, and ordermap from the dependency set.
Rollup merge of #67469 - cuviper:no-default-rustc-dev, r=Mark-Simulacrum
Remove rustc-dev from the default nightly components
It was already filtered from other branches, but we only kept it in
nightly's default to ease the transition. Now that the separation of
rust-std/rustc-dev has reached the 1.40 release, it seems like a good
time for that transition to end.
Rollup merge of #67160 - matthewjasper:gat-generics, r=nikomatsakis
Make GATs less ICE-prone.
After this PR simple lifetime-generic associated types can now be used in a compiling program. There are two big limitations:
* #30472 has not been addressed in any way (see src/test/ui/generic-associated-types/iterable.rs)
* Using type- and const-generic associated types errors because bound types and constants aren't handled by trait solving.
* The errors are technically non-fatal, but they happen in a [part of the compiler](https://github.com/rust-lang/rust/blob/4abb0ad2731e9ac6fd5d64d4cf15b7c82e4b5a81/src/librustc_typeck/lib.rs#L298) that fairly aggressively stops compiling on errors.
15 commits in 626f0f40efd32e6b3dbade50cd53fdfaa08446ba..5a139f7e6d67fd8a416a3f19d8e01581d24c0333
2019-12-03 16:53:04 +0000 to 2019-12-10 20:17:50 +0000
- Bump cargo-platform version. (rust-lang/cargo#7693)
- Add a test for `cargo locate-project` (rust-lang/cargo#7690)
- Emit error on [target.'cfg(debug_assertions)'.dependencies] and similar (rust-lang/cargo#7660)
- Update the layout of `Cargo Commands` in doc (rust-lang/cargo#7687)
- Features and dependencies can't have the same name (rust-lang/cargo#7682)
- Fix some typos in doc (rust-lang/cargo#7672)
- Add test for `NAME` environment variable when `cargo new` (rust-lang/cargo#7667)
- Add test for `GIT_COMMITTER_EMAIL` when `cargo new` (rust-lang/cargo#7666)
- document support for Bitbucket Pipelines badges (rust-lang/cargo#7663)
- Add cargo-vendor to the list of cargo commands in doc (rust-lang/cargo#7659)
- Fix typo in section 'Caching the Cargo home in CI' (rust-lang/cargo#7661)
- Docs: Add an appendix on git authentication. (rust-lang/cargo#7658)
- Remove --offline empty index error. (rust-lang/cargo#7655)
- Change the link destination of cargo book contribution (rust-lang/cargo#7657)
- Add a --offline hint. (rust-lang/cargo#7654)
bors [Sat, 21 Dec 2019 14:30:26 +0000 (14:30 +0000)]
Auto merge of #67485 - Centril:rollup-gt0opvr, r=Centril
Rollup of 7 pull requests
Successful merges:
- #67059 (Fix too restrictive checks on Drop impls)
- #67355 (Merge `ast::Mutability` and `mir::Mutability`)
- #67393 (Enable opting out of specific default LLVM arguments.)
- #67422 (Cleanup err codes)
- #67462 (Make ptr::slice_from_raw_parts a const fn available under a feature flag)
- #67467 (Test slice patterns more)
- #67478 (Fix src/libcore/str/mod.rs doc comments)
Rollup merge of #67462 - DutchGhost:const_slice_from_raw_parts, r=dtolnay
Make ptr::slice_from_raw_parts a const fn available under a feature flag
A first step in the direction of https://github.com/rust-lang/rust/issues/67456 .
This makes `ptr::slice_from_raw_parts` and `ptr::slice_from_raw_parts_mut` available as a const fn under a feature flag.
Rollup merge of #67393 - michaelwoerister:llvm-args-override, r=varkor
Enable opting out of specific default LLVM arguments.
`rustc` by default adds a few arguments to LLVM (like `-mergefunc-use-aliases` for example). With this PR `rustc` will only emit these arguments if the same argument has not already been specified by the user via `-Cllvm-args`. This enables opting out of these defaults.
The PR also removes a PGO specific `-Z` flag the effect of which can also be easily achieved by `-Cllvm-args`.
Rollup merge of #67059 - TommasoBianchi:dropck_fix_pr, r=pnkfelix
Fix too restrictive checks on Drop impls
Fixes #34426. Fixes #58311.
This PR completes and extends #59497 (which has been inactive for a while now).
The problem generating both issues was that when checking that the `Predicate`s of the `Drop` impl are exactly the same as the ones of the struct definition, the check was essentially performed by a simple `==` operator, which was not handling correctly HRTBs and involved `Fn` types.
The implemented solution relies on the `relate` machinery to more correctly equate `Predicate`s, and on `anonymize_late_bound_regions` to handle HRTB in a more general way. As the `Relate` trait currently is implemented only for `TraitPredicate` and `ProjectionPredicate` (and as they were the ones generating problems), `relate` is used only for them while for other `Predicate`s the equality check is kept. I'm currently considering whether it would make sense to implement the `Relate` trait also for all other `Predicate`s to render the proposed solution more general.
Matthew Jasper [Sun, 8 Dec 2019 17:22:35 +0000 (17:22 +0000)]
Update tests for GATs
* Make some run-pass or check-pass
* Use `#![allow(incomplete_features)]`
* Update FIXMEs now that some of the issues have been addressed
* Add regression tests
bors [Sat, 21 Dec 2019 11:05:03 +0000 (11:05 +0000)]
Auto merge of #66994 - Centril:stmt-polish, r=estebank
refactor expr & stmt parsing + improve recovery
Summary of important changes (best read commit-by-commit, ignoring whitespace changes):
- `AttrVec` is introduces as an alias for `ThinVec<Attribute>`
- `parse_expr_bottom` and `parse_stmt` are thoroughly refactored.
- Extract diagnostics logic for `vec![...]` in a pattern context.
- Recovery is added for `do catch { ... }`
- Recovery is added for `'label: non_block_expr`
- Recovery is added for `var $local`, `auto $local`, and `mut $local`. Fixes #65257.
- Recovery is added for `e1 and e2` and `e1 or e2`.
- ~~`macro_legacy_warnings` is turned into an error (has been a warning for 3 years!)~~
- Fixes #63396 by forward-porting #64105 which now works thanks to added recovery.
- `ui-fulldeps/ast_stmt_expr_attr.rs` is turned into UI and pretty tests.
- Recovery is fixed for `#[attr] if expr {}`
bors [Sat, 21 Dec 2019 01:02:54 +0000 (01:02 +0000)]
Auto merge of #67464 - Centril:rollup-j3mkl1m, r=Centril
Rollup of 6 pull requests
Successful merges:
- #67130 (Const prop should finish propagation into user defined variables)
- #67163 (Split up ptr/mod.rs in libcore...)
- #67314 (Don't suppress move errors for union fields)
- #67392 (Fix unresolved type span inside async object)
- #67404 (Separate region inference logic from error handling better)
- #67428 (`is_binding_pat`: use explicit match & include or-pats in grammar)
Josh Stone [Fri, 20 Dec 2019 23:45:03 +0000 (15:45 -0800)]
Remove rustc-dev from the default nightly components
It was already filtered from other branches, but we only kept it in
nightly's default to ease the transition. Now that the separation of
rust-std/rustc-dev has reached the 1.40 release, it seems like a good
time for that transition to end.