]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoFormat the world
Mark Rousskov [Sun, 22 Dec 2019 22:42:04 +0000 (17:42 -0500)]
Format the world

4 years agoRemove most files from format ignore list
Mark Rousskov [Sun, 22 Dec 2019 21:43:54 +0000 (16:43 -0500)]
Remove most files from format ignore list

Also moves formatting to use edition 2018, and to be done in parallel.
This brings near-linear speed ups (at least with a small amount of
cores).

4 years agoAuto merge of #67532 - Centril:rollup-3duj42d, r=Centril
bors [Sun, 22 Dec 2019 19:30:57 +0000 (19:30 +0000)]
Auto merge of #67532 - Centril:rollup-3duj42d, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #66877 (Add simpler entry points to const eval for common usages.)
 - #67299 (Add `ImmTy::try_from_(u)int` methods)
 - #67487 (Rustdoc mutability removal)
 - #67499 (Misc MIR building cleanups)
 - #67506 (Remove iter_private.rs)
 - #67508 (Fix typo in path parser name)
 - #67519 (Document why Any is not an unsafe trait)
 - #67525 (Utilize rust-lang/rust commit hashes in toolstate)

Failed merges:

r? @ghost

4 years agoRollup merge of #67525 - Mark-Simulacrum:fix-toolstate-master, r=Centril
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:18 +0000 (19:46 +0100)]
Rollup merge of #67525 - Mark-Simulacrum:fix-toolstate-master, r=Centril

Utilize rust-lang/rust commit hashes in toolstate

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).

4 years agoRollup merge of #67519 - Mark-Simulacrum:any-unsafe, r=Centril
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:16 +0000 (19:46 +0100)]
Rollup merge of #67519 - Mark-Simulacrum:any-unsafe, r=Centril

Document why Any is not an unsafe trait

The added documentation is not public (i.e., not in a doc comment) but that seems appropriate for this sort of low-level detail.

Fixes #62303

4 years agoRollup merge of #67508 - davesque:master, r=Dylan-DPC
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:15 +0000 (19:46 +0100)]
Rollup merge of #67508 - davesque:master, r=Dylan-DPC

Fix typo in path parser name

It appears that a little typo crept into the name of a path parsing method.

4 years agoRollup merge of #67506 - qnighy:remove-iter-private, r=Dylan-DPC
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:13 +0000 (19:46 +0100)]
Rollup merge of #67506 - qnighy:remove-iter-private, r=Dylan-DPC

Remove iter_private.rs

The contents of this file have been moved in #56932 (520e8b0) and the file should have been removed as well.

4 years agoRollup merge of #67499 - Centril:mir-match-clean, r=matthewjasper
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:12 +0000 (19:46 +0100)]
Rollup merge of #67499 - Centril:mir-match-clean, r=matthewjasper

Misc MIR building cleanups

r? @matthewjasper

4 years agoRollup merge of #67487 - GuillaumeGomez:rustdoc-mutability-removal, r=Centril
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:10 +0000 (19:46 +0100)]
Rollup merge of #67487 - GuillaumeGomez:rustdoc-mutability-removal, r=Centril

Rustdoc mutability removal

Fixes #67470.

As discussed in another PR, the `clean::Mutability` type in rustdoc is useless. So let's remove it!

r? @Centril

4 years agoRollup merge of #67299 - christianpoveda:try_immty_from_int, r=RalfJung
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:08 +0000 (19:46 +0100)]
Rollup merge of #67299 - christianpoveda:try_immty_from_int, r=RalfJung

Add `ImmTy::try_from_(u)int` methods

r? @RalfJung

4 years agoRollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obk
Mazdak Farrokhzad [Sun, 22 Dec 2019 18:46:07 +0000 (19:46 +0100)]
Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obk

Add simpler entry points to const eval for common usages.

I found the `tcx.const_eval` API to be complex/awkward to work with, because of the inherent complexity from all of the different situations it is called from. Though it mainly used in one of the following ways:
- Evaluates the value of a constant without any substitutions, e.g. evaluating a static, discriminant, etc.
- Evaluates the value of a resolved instance of a constant. this happens when evaluating unevaluated constants or normalising trait constants.
- Evaluates a promoted constant.

This PR adds three new functions `const_eval_mono`, `const_eval_resolve`, and `const_eval_promoted` to `TyCtxt`, which each cater to one of the three ways `tcx.const_eval`
 is normally used.

4 years agoUtilize rust-lang/rust commit hashes in toolstate
Rust Toolstate Update [Sun, 22 Dec 2019 14:21:08 +0000 (09:21 -0500)]
Utilize rust-lang/rust commit hashes in toolstate

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).

4 years agoAuto merge of #65939 - anp:incremental-rustfmt-rollout, r=Mark-Simulacrum
bors [Sun, 22 Dec 2019 13:34:05 +0000 (13:34 +0000)]
Auto merge of #65939 - anp:incremental-rustfmt-rollout, r=Mark-Simulacrum

Enable incremental rustfmt adoption

Enables an incremental rollout of rustfmt usage within the compiler via a granular ignore configuration and automated enforcement. The decision to format the repository was approved in https://github.com/rust-lang/compiler-team/issues/80#issuecomment-491324079.

This PR includes:

* an `[ignore]` section to `rustfmt.toml` including most of the repository
* `./x.py` downloads rustfmt from a specific nightly (we do not pin to beta or stable as we need unstable features)
* an `./x.py fmt [--check]` command which runs cargo-fmt
* `./x.py fmt --check` runs during the same test step as `src/tools/tidy`, on master, but not on beta or stable as we don't want to depend on nightly rustfmt there.
* a commit to format `src/librustc_fs_util` as an initial target and to ensure enforcement is working from the start

4 years agoAdd error message if `Scalar::from_(u)int` fails
Christian Poveda [Sun, 22 Dec 2019 13:22:14 +0000 (08:22 -0500)]
Add error message if `Scalar::from_(u)int` fails

4 years agoDocument why Any is not an unsafe trait
Mark Rousskov [Sun, 22 Dec 2019 12:54:18 +0000 (07:54 -0500)]
Document why Any is not an unsafe trait

4 years agoDo not run if rustfmt.toml does not exist
Mark Rousskov [Sun, 22 Dec 2019 12:44:09 +0000 (07:44 -0500)]
Do not run if rustfmt.toml does not exist

distcheck (and generally publishing tarballs) will not package
rustfmt.toml and we for now still support running tidy etc in those
tarballs.

4 years agoImplement PrintWithSpace trait on hir::Mutability
Guillaume Gomez [Sat, 21 Dec 2019 14:47:27 +0000 (15:47 +0100)]
Implement PrintWithSpace trait on hir::Mutability

4 years agoAuto merge of #66931 - cjgillot:hirene-preamble, r=eddyb
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.

Work mentored by @Zoxc.

4 years agoAuto merge of #67505 - Centril:rollup-7win7ty, r=Centril
bors [Sun, 22 Dec 2019 07:01:50 +0000 (07:01 +0000)]
Auto merge of #67505 - Centril:rollup-7win7ty, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #67148 ( Refactor type & bounds parsing thoroughly)
 - #67410 (Reenable static linking of libstdc++ on windows-gnu)
 - #67439 (Cleanup `lower_pattern_unadjusted` & Improve slice pat typeck)
 - #67480 (Require issue = "none" over issue = "0" in unstable attributes)
 - #67500 (Tweak non_shorthand_field_patterns' suggestion)
 - #67504 (Warn against relying on ?Sized being last)

Failed merges:

r? @ghost

4 years agoFix typo in path parser name
David Sanders [Sun, 22 Dec 2019 05:11:02 +0000 (22:11 -0700)]
Fix typo in path parser name

4 years agoAuto merge of #67486 - matthiaskrgr:submodule_upd, r=oli-obk
bors [Sun, 22 Dec 2019 03:42:58 +0000 (03:42 +0000)]
Auto merge of #67486 - matthiaskrgr:submodule_upd, r=oli-obk

submodules: update clippy from 69f99e74 to acbc609a

Changes:
````
rustup "Merge `ast::Mutability` and `mir::Mutability`"
rustup https://github.com/rust-lang/rust/pull/67130
rustup https://github.com/rust-lang/rust/pull/67455
Update lints for `iterator_step_by_zero` changes
Fix 'redudant' spelling in redundant_clone docs
Fix documentation example for unnecessary_filter_map.
Fix `expect_fun_call` false negative on references
Fix `iterator_step_by_zero` description in declaration
Fix `iterator_step_by_zero` definition
Correct `iterator_step_by_zero` documentation
Update iterator_step_by_zero
Prevent `cmp_nan` when inside constants
Detect comparisons with NAN constants
Fix clippy build failure
````

r? @oli-obk  @Manishearth

4 years agoRollup merge of #67504 - Mark-Simulacrum:note-data-offset, r=Centril
Mazdak Farrokhzad [Sun, 22 Dec 2019 01:40:07 +0000 (02:40 +0100)]
Rollup merge of #67504 - Mark-Simulacrum:note-data-offset, r=Centril

Warn against relying on ?Sized being last

Fixes #62522

4 years agoRollup merge of #67500 - JohnTitor:non-shorthand-field-patterns, r=Centril
Mazdak Farrokhzad [Sun, 22 Dec 2019 01:40:06 +0000 (02:40 +0100)]
Rollup merge of #67500 - JohnTitor:non-shorthand-field-patterns, r=Centril

Tweak non_shorthand_field_patterns' suggestion

Fixes #66434

r? @estebank

4 years agoRollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=Centril
Mazdak Farrokhzad [Sun, 22 Dec 2019 01:40:04 +0000 (02:40 +0100)]
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.

Resolves #41260

r? @varkor

4 years agoRollup merge of #67439 - Centril:clean-hair-slice, r=matthewjasper
Mazdak Farrokhzad [Sun, 22 Dec 2019 01:40:03 +0000 (02:40 +0100)]
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.

r? @matthewjasper

4 years agoRollup merge of #67410 - mati865:mingw_link_fix, r=Mark-Simulacrum
Mazdak Farrokhzad [Sun, 22 Dec 2019 01:40:01 +0000 (02:40 +0100)]
Rollup merge of #67410 - mati865:mingw_link_fix, r=Mark-Simulacrum

Reenable static linking of libstdc++ on windows-gnu

Fixes https://github.com/rust-lang/rust/issues/67408

Verified locally that `rustc_driver` is now statically linked to libstdc++.

4 years agoRollup merge of #67148 - Centril:ty-polish, r=estebank
Mazdak Farrokhzad [Sun, 22 Dec 2019 01:40:00 +0000 (02:40 +0100)]
Rollup merge of #67148 - Centril:ty-polish, r=estebank

 Refactor type & bounds parsing thoroughly

PR is based on https://github.com/rust-lang/rust/pull/67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`.

Also fixes #67146.

r? @estebank

4 years agoWarn against relying on ?Sized being last
Mark Rousskov [Sun, 22 Dec 2019 01:35:41 +0000 (20:35 -0500)]
Warn against relying on ?Sized being last

4 years agoImplement rustfmt running manually using ignore crate
Mark Rousskov [Wed, 18 Dec 2019 15:52:10 +0000 (10:52 -0500)]
Implement rustfmt running manually using ignore crate

This replaces cargo-fmt with rustfmt with --skip-children which should
allow us to format code without running into rust-lang/rustfmt#3930.

This also bumps up the version of rustfmt used to a more recent one.

4 years agoInclude formatting check in the test step for tidy.
Adam Perry [Thu, 31 Oct 2019 02:23:50 +0000 (19:23 -0700)]
Include formatting check in the test step for tidy.

4 years agoFormat src/librustc_fs_util.
Adam Perry [Mon, 4 Nov 2019 16:28:40 +0000 (08:28 -0800)]
Format src/librustc_fs_util.

In total it's about 100 lines of code and has received less than 5 commits in 2019 -- a good starting point.

4 years agoImplement `./x.py fmt [--check]`.
Adam Perry [Wed, 30 Oct 2019 23:56:27 +0000 (16:56 -0700)]
Implement `./x.py fmt [--check]`.

4 years agobootstrap.py fetches rustfmt.
Adam Perry [Wed, 30 Oct 2019 02:43:37 +0000 (19:43 -0700)]
bootstrap.py fetches rustfmt.

Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
4 years agoAdd individual crates to rustfmt ignore list.
Adam Perry [Tue, 29 Oct 2019 15:33:11 +0000 (08:33 -0700)]
Add individual crates to rustfmt ignore list.

Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
4 years agoAuto merge of #66932 - rust-lang:pass-check-runfail, r=petrochenkov
bors [Sun, 22 Dec 2019 00:10:13 +0000 (00:10 +0000)]
Auto merge of #66932 - rust-lang:pass-check-runfail, r=petrochenkov

Revamp `// run-fail` wrt. `--pass` & support `// build-fail` & `// check-fail`

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.

Fixes #66929.
Fixes #67128.

r? @petrochenkov
cc @RalfJung @ninjasource

4 years agoTweak non_shorthand_field_patterns' suggestion
Yuki Okushi [Sat, 21 Dec 2019 22:59:38 +0000 (07:59 +0900)]
Tweak non_shorthand_field_patterns' suggestion

4 years agoNits.
Camille GILLOT [Sun, 1 Dec 2019 16:33:31 +0000 (17:33 +0100)]
Nits.

4 years agoTidy.
Camille GILLOT [Sun, 1 Dec 2019 11:49:54 +0000 (12:49 +0100)]
Tidy.

4 years agoUse Arena inside hir::Body.
Camille GILLOT [Fri, 29 Nov 2019 10:09:23 +0000 (11:09 +0100)]
Use Arena inside hir::Body.

4 years agoUse Arena inside hir::Mod.
Camille GILLOT [Fri, 29 Nov 2019 09:24:47 +0000 (10:24 +0100)]
Use Arena inside hir::Mod.

4 years agoUse Arena inside hir::StructField.
Camille GILLOT [Fri, 29 Nov 2019 08:40:33 +0000 (09:40 +0100)]
Use Arena inside hir::StructField.

4 years agoUse Arena inside hir::EnumDef.
Camille GILLOT [Fri, 29 Nov 2019 08:26:18 +0000 (09:26 +0100)]
Use Arena inside hir::EnumDef.

4 years agoUse Arena inside hir::ImplItem.
Camille GILLOT [Thu, 28 Nov 2019 21:16:44 +0000 (22:16 +0100)]
Use Arena inside hir::ImplItem.

4 years agoUse Arena inside hir::TraitItem.
Camille GILLOT [Thu, 28 Nov 2019 20:47:10 +0000 (21:47 +0100)]
Use Arena inside hir::TraitItem.

4 years agoUse Arena inside hir::ForeignItem.
Camille GILLOT [Thu, 28 Nov 2019 19:18:29 +0000 (20:18 +0100)]
Use Arena inside hir::ForeignItem.

4 years agoHandle Attributes in arena.
Camille GILLOT [Thu, 28 Nov 2019 22:50:47 +0000 (23:50 +0100)]
Handle Attributes in arena.

4 years agoUse Arena inside hir::Item.
Camille GILLOT [Thu, 28 Nov 2019 18:28:50 +0000 (19:28 +0100)]
Use Arena inside hir::Item.

4 years agoAdd simpler entry points to const eval for common usages.
Ben Lewis [Fri, 29 Nov 2019 19:42:56 +0000 (08:42 +1300)]
Add simpler entry points to const eval for common usages.

4 years agoUse Arena inside hir::Crate.
Camille GILLOT [Thu, 28 Nov 2019 10:49:29 +0000 (11:49 +0100)]
Use Arena inside hir::Crate.

4 years agoadd build-fail to 32-bit tests
Mazdak Farrokhzad [Sat, 21 Dec 2019 21:33:36 +0000 (22:33 +0100)]
add build-fail to 32-bit tests

4 years agofix rebase fallout
Mazdak Farrokhzad [Sun, 15 Dec 2019 04:45:34 +0000 (05:45 +0100)]
fix rebase fallout

4 years agorefactor & address review comments
Mazdak Farrokhzad [Sat, 14 Dec 2019 14:33:05 +0000 (15:33 +0100)]
refactor & address review comments

4 years agorework run-fail and support check,build-fail
Mazdak Farrokhzad [Sat, 14 Dec 2019 03:28:32 +0000 (04:28 +0100)]
rework run-fail and support check,build-fail

4 years agomake `--pass check` work with `// run-fail` tests
Mazdak Farrokhzad [Sun, 1 Dec 2019 12:31:50 +0000 (13:31 +0100)]
make `--pass check` work with `// run-fail` tests

4 years agosimplify MIR building with cfg.goto(...)
Mazdak Farrokhzad [Fri, 20 Dec 2019 17:27:05 +0000 (18:27 +0100)]
simplify MIR building with cfg.goto(...)

4 years agomisc cleanup in match MIR building
Mazdak Farrokhzad [Fri, 20 Dec 2019 17:05:45 +0000 (18:05 +0100)]
misc cleanup in match MIR building

4 years agoAuto merge of #67495 - Centril:rollup-6aer3xg, r=Centril
bors [Sat, 21 Dec 2019 20:59:22 +0000 (20:59 +0000)]
Auto merge of #67495 - Centril:rollup-6aer3xg, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #67160 (Make GATs less ICE-prone.)
 - #67333 ([mir-opt] Fix `Inline` pass to handle inlining into `box` expressions)
 - #67420 (use _val to ignore parameter of any::type_name_of_val)
 - #67469 (Remove rustc-dev from the default nightly components)
 - #67489 (Drop petgraph dependency from bootstrap)
 - #67490 (Document privacy of RangeInclusive fields)
 - #67491 (use Result::map_or for bootstrap)

Failed merges:

r? @ghost

4 years agoRemove clean::Mutability enum
Guillaume Gomez [Sat, 21 Dec 2019 14:29:46 +0000 (15:29 +0100)]
Remove clean::Mutability enum

4 years agosubmodules: update clippy from 69f99e74 to cfb33200
Matthias Krüger [Sat, 21 Dec 2019 20:04:28 +0000 (21:04 +0100)]
submodules: update clippy from 69f99e74 to cfb33200

Changes:
````
rustup "Merge `ast::Mutability` and `mir::Mutability`"
rustup https://github.com/rust-lang/rust/pull/67130
rustup https://github.com/rust-lang/rust/pull/67455
There are no per-file copyright headers anymore
Update lints for `iterator_step_by_zero` changes
Fix 'redudant' spelling in redundant_clone docs
Fix documentation example for unnecessary_filter_map.
Fix `expect_fun_call` false negative on references
Fix `iterator_step_by_zero` description in declaration
Fix `iterator_step_by_zero` definition
Correct `iterator_step_by_zero` documentation
Update iterator_step_by_zero
Prevent `cmp_nan` when inside constants
Detect comparisons with NAN constants
Fix clippy build failure
````

4 years agoUpdate unstable book build to use NonZeroU32
LeSeulArtichaut [Sat, 21 Dec 2019 13:50:56 +0000 (14:50 +0100)]
Update unstable book build to use NonZeroU32

4 years agospan_suggestion_hidden -> tool_only_span_suggestion
Mazdak Farrokhzad [Sat, 21 Dec 2019 02:32:54 +0000 (03:32 +0100)]
span_suggestion_hidden -> tool_only_span_suggestion

4 years agounwrap -> expect
Mazdak Farrokhzad [Sat, 21 Dec 2019 02:28:22 +0000 (03:28 +0100)]
unwrap -> expect

4 years agoparse_ty_bare_fn: improve docs
Mazdak Farrokhzad [Sun, 8 Dec 2019 11:40:20 +0000 (12:40 +0100)]
parse_ty_bare_fn: improve docs

4 years agodocument parse_late_bound_lifetime_defs
Mazdak Farrokhzad [Sun, 8 Dec 2019 11:29:55 +0000 (12:29 +0100)]
document parse_late_bound_lifetime_defs

4 years agoextract error_negative_bounds
Mazdak Farrokhzad [Sun, 8 Dec 2019 11:29:05 +0000 (12:29 +0100)]
extract error_negative_bounds

4 years agoparse_generic_bounds: account for negative lifetime bounds
Mazdak Farrokhzad [Sun, 8 Dec 2019 11:19:53 +0000 (12:19 +0100)]
parse_generic_bounds: account for negative lifetime bounds

4 years agosimplify 'let question = ...;'
Mazdak Farrokhzad [Sun, 8 Dec 2019 10:57:18 +0000 (11:57 +0100)]
simplify 'let question = ...;'

4 years agosimplify negative bound diagnostic
Mazdak Farrokhzad [Sun, 8 Dec 2019 10:49:25 +0000 (11:49 +0100)]
simplify negative bound diagnostic

4 years agoextract parse_generic_lt_bound
Mazdak Farrokhzad [Sun, 8 Dec 2019 10:28:57 +0000 (11:28 +0100)]
extract parse_generic_lt_bound

4 years agoextract parse_generic_ty_bound
Mazdak Farrokhzad [Sun, 8 Dec 2019 10:19:24 +0000 (11:19 +0100)]
extract parse_generic_ty_bound

4 years agoparse_generic_bound: leave a FIXME
Mazdak Farrokhzad [Sun, 8 Dec 2019 10:08:04 +0000 (11:08 +0100)]
parse_generic_bound: leave a FIXME

4 years agofunctionalize parse_generic_bound
Mazdak Farrokhzad [Sun, 8 Dec 2019 10:04:26 +0000 (11:04 +0100)]
functionalize parse_generic_bound

4 years agoextract parse_generic_bound
Mazdak Farrokhzad [Sun, 8 Dec 2019 09:32:38 +0000 (10:32 +0100)]
extract parse_generic_bound

4 years agoextract can_begin_bound
Mazdak Farrokhzad [Sun, 8 Dec 2019 09:04:31 +0000 (10:04 +0100)]
extract can_begin_bound

4 years agoparse_generic_bounds_common: dedent
Mazdak Farrokhzad [Sun, 8 Dec 2019 08:42:32 +0000 (09:42 +0100)]
parse_generic_bounds_common: dedent

4 years agoextract recover_paren_lifetime
Mazdak Farrokhzad [Sun, 8 Dec 2019 08:29:17 +0000 (09:29 +0100)]
extract recover_paren_lifetime

4 years agoextract error_opt_out_lifetime
Mazdak Farrokhzad [Sun, 8 Dec 2019 08:18:34 +0000 (09:18 +0100)]
extract error_opt_out_lifetime

4 years agoparser/ty.rs: minor formatting tweaks
Mazdak Farrokhzad [Sun, 8 Dec 2019 08:10:17 +0000 (09:10 +0100)]
parser/ty.rs: minor formatting tweaks

4 years agoparse_ty_common: .fatal -> .struct_span_err
Mazdak Farrokhzad [Sun, 8 Dec 2019 08:08:19 +0000 (09:08 +0100)]
parse_ty_common: .fatal -> .struct_span_err

4 years agoextract error_illegal_c_variadic_ty
Mazdak Farrokhzad [Sun, 8 Dec 2019 08:01:26 +0000 (09:01 +0100)]
extract error_illegal_c_variadic_ty

4 years agoextract parse_path_start_ty
Mazdak Farrokhzad [Sun, 8 Dec 2019 07:49:20 +0000 (08:49 +0100)]
extract parse_path_start_ty

4 years agoextract parse_dyn_ty
Mazdak Farrokhzad [Sun, 8 Dec 2019 07:38:23 +0000 (08:38 +0100)]
extract parse_dyn_ty

4 years agoextract parse_impl_ty
Mazdak Farrokhzad [Sun, 8 Dec 2019 07:29:12 +0000 (08:29 +0100)]
extract parse_impl_ty

4 years agoextract parse_typeof_ty
Mazdak Farrokhzad [Sun, 8 Dec 2019 07:23:10 +0000 (08:23 +0100)]
extract parse_typeof_ty

4 years agoextract parse_array_or_slice_ty
Mazdak Farrokhzad [Sun, 8 Dec 2019 07:19:53 +0000 (08:19 +0100)]
extract parse_array_or_slice_ty

4 years agoRollup merge of #67491 - lzutao:res-map-or, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:44 +0000 (19:07 +0100)]
Rollup merge of #67491 - lzutao:res-map-or, r=Mark-Simulacrum

use Result::map_or for bootstrap

4 years agoRollup merge of #67490 - Mark-Simulacrum:i-67371, r=Dylan-DPC
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:42 +0000 (19:07 +0100)]
Rollup merge of #67490 - Mark-Simulacrum:i-67371, r=Dylan-DPC

Document privacy of RangeInclusive fields

Fixes #67371

4 years agoRollup merge of #67489 - Mark-Simulacrum:drop-petgraph, r=Centril
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:40 +0000 (19:07 +0100)]
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.

r? @alexcrichton

4 years agoRollup merge of #67469 - cuviper:no-default-rustc-dev, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:39 +0000 (19:07 +0100)]
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.

Closes #67425.
r? @Mark-Simulacrum

4 years agoRollup merge of #67420 - lzutao:_val, r=Centril
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:37 +0000 (19:07 +0100)]
Rollup merge of #67420 - lzutao:_val, r=Centril

use _val to ignore parameter of any::type_name_of_val

mem::drop does the same thing too.

4 years agoRollup merge of #67333 - wesleywiser:fix_inline_into_box_place, r=oli-obk
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:36 +0000 (19:07 +0100)]
Rollup merge of #67333 - wesleywiser:fix_inline_into_box_place, r=oli-obk

[mir-opt] Fix `Inline` pass to handle inlining into `box` expressions

r? @oli-obk

Before, the test case just ICE'd here:

https://github.com/rust-lang/rust/blob/a605441e049f0b6d5f7715b94b8ac4662fd7fcf6/src/librustc_mir/transform/inline.rs#L668

4 years agoRollup merge of #67160 - matthewjasper:gat-generics, r=nikomatsakis
Mazdak Farrokhzad [Sat, 21 Dec 2019 18:07:31 +0000 (19:07 +0100)]
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.

closes #47206
closes #49362
closes #62521
closes #63300
closes #64755
closes #67089

4 years agoAuto merge of #67206 - ehuss:update-cargo-books, r=dtolnay
bors [Sat, 21 Dec 2019 17:52:47 +0000 (17:52 +0000)]
Auto merge of #67206 - ehuss:update-cargo-books, r=dtolnay

Update cargo, books

Update nomicon, cargo, reference, book, rust-by-example, embedded-book

## nomicon

2 commits in 041c46e692a2592853aeca132c8dfe8eb5a79a9e..8be35b201f9cf0a4c3fcc96c83ac21671dcf3112
2019-11-20 16:46:45 +0100 to 2019-12-01 13:02:12 -0500
- Update unwinding.md
- ci: remove needless rust-docs component

## cargo

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)

## reference

2 commits in 9e843aeb4df083522c7277179bbaa25d0507731c..787e8d84034a4a0ae17084bbae25474152144b9a
2019-11-24 17:44:04 +0100 to 2019-12-10 10:01:29 -0800
- Update for visibility syntax changes. (rust-lang-nursery/reference#722)
- document `bind_by_move_pattern_guards` (rust-lang-nursery/reference#720)

## book

2 commits in 81ebaa2a3f88d4d106516c489682e64cacba4f60..ef8bb568035ded8ddfa30a9309026638cc3c8136
2019-11-15 08:30:04 -0800 to 2019-11-28 11:00:04 -0600
- Remove optional commas from match arms in ch18-03 (rust-lang/book#2176)
- Remove call_box() from ch20-03 (rust-lang/book#2177)

## rust-by-example

1 commits in 4835e025826729827a94fdeb7cb85fed288d08bb..b7ac1bc76b7d02a43c83b3a931d226f708aa1ff4
2019-11-14 09:20:43 -0300 to 2019-12-02 11:38:43 -0300
- Make TryFrom & TryInto example editable (rust-lang/rust-by-example#1297)

## embedded-book

1 commits in 5ca585c4a7552efb546e7681c3de0712f4ae4fdc..c26234930282210849256e4ecab925f0f2daf3be
2019-08-27 13:39:14 +0000 to 2019-12-07 17:25:11 +0000
- Fix `impl Gpio` -&gt; `impl GpioConfig`  (rust-embedded/book#216)

4 years agoparse_ptr -> parse_ty_ptr & refactor
Mazdak Farrokhzad [Sun, 8 Dec 2019 06:58:45 +0000 (07:58 +0100)]
parse_ptr -> parse_ty_ptr & refactor

4 years agorefactor parse_ty_tuple_or_parens
Mazdak Farrokhzad [Sun, 8 Dec 2019 06:55:38 +0000 (07:55 +0100)]
refactor parse_ty_tuple_or_parens

4 years agoextract parse_ty_tuple_or_parens
Mazdak Farrokhzad [Sun, 8 Dec 2019 05:44:24 +0000 (06:44 +0100)]
extract parse_ty_tuple_or_parens

4 years agouse Result::map_or for bootstrap
Lzu Tao [Sat, 21 Dec 2019 17:04:41 +0000 (17:04 +0000)]
use Result::map_or for bootstrap

4 years agouse _val to ignore parameter of any::type_name_of_val
Lzu Tao [Sat, 21 Dec 2019 16:48:35 +0000 (16:48 +0000)]
use _val to ignore parameter of any::type_name_of_val

4 years agoDocument privacy of RangeInclusive fields
Mark Rousskov [Sat, 21 Dec 2019 16:27:51 +0000 (11:27 -0500)]
Document privacy of RangeInclusive fields

4 years agoDrop petgraph dependency from bootstrap
Mark Rousskov [Sat, 21 Dec 2019 15:54:15 +0000 (10:54 -0500)]
Drop petgraph dependency from bootstrap

It was essentially unused, likely leftover from a previous refactoring
iteration.