]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoTidy
Oliver Scherer [Mon, 23 Dec 2019 14:22:36 +0000 (15:22 +0100)]
Tidy

4 years agoUpdate src/librustc_mir/interpret/intern.rs
Oliver Scherer [Mon, 23 Dec 2019 13:50:34 +0000 (14:50 +0100)]
Update src/librustc_mir/interpret/intern.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoShow `const_err` lints
Oliver Scherer [Sun, 22 Dec 2019 20:42:50 +0000 (21:42 +0100)]
Show `const_err` lints

4 years agoConstants reading or referencing statics is illegal
Oliver Scherer [Sun, 22 Dec 2019 20:40:00 +0000 (21:40 +0100)]
Constants reading or referencing statics is illegal

and some uses of it will be illegal forever
(e.g. mutable or interior mutable statics)

4 years agoDynamically prevent constants from accessing statics
Oliver Scherer [Mon, 16 Dec 2019 14:23:42 +0000 (15:23 +0100)]
Dynamically prevent constants from accessing statics

4 years agoPanic on mutable allocs in constants
Oliver Scherer [Mon, 16 Dec 2019 14:23:26 +0000 (15:23 +0100)]
Panic on mutable allocs in constants

4 years agoAuto merge of #67540 - Mark-Simulacrum:fmt-the-world, r=Centril
bors [Mon, 23 Dec 2019 02:47:52 +0000 (02:47 +0000)]
Auto merge of #67540 - Mark-Simulacrum:fmt-the-world, r=Centril

Format the world

This PR modifies the formatting infrastructure a bit in the first commit (to enable the forgotten 2018 edition), as well as removes most directories from the ignore list in rustfmt.toml. It then follows that up with the second commit which runs `x.py fmt` and formats the entire repository.

We continue to not format the test directory (`src/test`) because of interactions with pretty printing and, in part, because re-blessing all of those files is somewhat harder to review, so is best suited for a follow up PR in my opinion.

4 years agoChange bound order in rustfmt test
Mark Rousskov [Mon, 23 Dec 2019 02:46:51 +0000 (21:46 -0500)]
Change bound order in rustfmt test

It is unclear why this changed, but since it seems like a harmless
change, we're going to move forward with reformatting.

4 years agotemporary retry around msys2 install
Mark Rousskov [Mon, 23 Dec 2019 01:06:02 +0000 (20:06 -0500)]
temporary retry around msys2 install

4 years agotest fallout
Mark Rousskov [Mon, 23 Dec 2019 00:04:10 +0000 (19:04 -0500)]
test fallout

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.