]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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` -> `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.

4 years agoAuto merge of #67485 - Centril:rollup-gt0opvr, r=Centril
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)

Failed merges:

r? @ghost

4 years agoRollup merge of #67478 - brunobell:master, r=Centril
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:50 +0000 (15:29 +0100)]
Rollup merge of #67478 - brunobell:master, r=Centril

Fix src/libcore/str/mod.rs doc comments

Fix grammar in src/libcore/str/mod.rs doc comments. r? @steveklabnik

4 years agoRollup merge of #67467 - matthewjasper:test-slice-patterns, r=oli-obk
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:49 +0000 (15:29 +0100)]
Rollup merge of #67467 - matthewjasper:test-slice-patterns, r=oli-obk

Test slice patterns more

Adds tests for const evaluation and some more borrow checking tests.

Fixes some bugs in const eval for subslice patterns.
closes #66934

r? @oli-obk
cc @Centril

4 years agoRollup merge of #67462 - DutchGhost:const_slice_from_raw_parts, r=dtolnay
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:47 +0000 (15:29 +0100)]
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.

4 years agoRollup merge of #67422 - GuillaumeGomez:cleanup-err-codes, r=Dylan-DPC
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:45 +0000 (15:29 +0100)]
Rollup merge of #67422 - GuillaumeGomez:cleanup-err-codes, r=Dylan-DPC

Cleanup err codes

r? @Dylan-DPC

4 years agoRollup merge of #67393 - michaelwoerister:llvm-args-override, r=varkor
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:44 +0000 (15:29 +0100)]
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`.

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

4 years agoRollup merge of #67355 - Centril:merge-mut, r=oli-obk
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:42 +0000 (15:29 +0100)]
Rollup merge of #67355 - Centril:merge-mut, r=oli-obk

Merge `ast::Mutability` and `mir::Mutability`

r? @oli-obk

4 years agoRollup merge of #67059 - TommasoBianchi:dropck_fix_pr, r=pnkfelix
Mazdak Farrokhzad [Sat, 21 Dec 2019 14:29:40 +0000 (15:29 +0100)]
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.

4 years agoFix rustdoc
Matthew Jasper [Sun, 8 Dec 2019 22:02:33 +0000 (22:02 +0000)]
Fix rustdoc

4 years agoUpdate tests for GATs
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

4 years agoAdd more tests for slice patterns
Matthew Jasper [Sun, 15 Dec 2019 16:14:24 +0000 (16:14 +0000)]
Add more tests for slice patterns

4 years agoAuto merge of #66994 - Centril:stmt-polish, r=estebank
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 {}`

r? @estebank

4 years agoFix src/libcore/str/mod.rs doc comments
Broono Lu [Sat, 21 Dec 2019 10:12:46 +0000 (18:12 +0800)]
Fix src/libcore/str/mod.rs doc comments

4 years agoMove the rest of the mir-opt inline tests into a folder
Wesley Wiser [Sun, 15 Dec 2019 20:37:28 +0000 (15:37 -0500)]
Move the rest of the mir-opt inline tests into a folder

4 years ago[mir-opt] Fix `Inline` pass to handle inlining into `box` expressions
Wesley Wiser [Sun, 15 Dec 2019 19:07:30 +0000 (14:07 -0500)]
[mir-opt] Fix `Inline` pass to handle inlining into `box` expressions

4 years agoAuto merge of #67464 - Centril:rollup-j3mkl1m, r=Centril
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)

Failed merges:

r? @ghost

4 years agoRemove rustc-dev from the default nightly components
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.

4 years agoDon't ICE in subslice pattern const-eval
Matthew Jasper [Fri, 20 Dec 2019 23:11:41 +0000 (23:11 +0000)]
Don't ICE in subslice pattern const-eval

4 years agotweak var/auto/mut recovery
Mazdak Farrokhzad [Wed, 4 Dec 2019 11:15:01 +0000 (12:15 +0100)]
tweak var/auto/mut recovery

4 years agouse .span_suggestion_short for &&
Mazdak Farrokhzad [Wed, 4 Dec 2019 10:27:11 +0000 (11:27 +0100)]
use .span_suggestion_short for &&

4 years agoast_stmt_expr_attr -> pretty & ui tests
Mazdak Farrokhzad [Wed, 4 Dec 2019 10:16:12 +0000 (11:16 +0100)]
ast_stmt_expr_attr -> pretty & ui tests

4 years agofix bug in parse_tuple_parens_expr + related refactoring
Mazdak Farrokhzad [Wed, 4 Dec 2019 09:13:29 +0000 (10:13 +0100)]
fix bug in parse_tuple_parens_expr + related refactoring

4 years agorecover `#[attr] if expr {}`
Mazdak Farrokhzad [Wed, 4 Dec 2019 07:10:41 +0000 (08:10 +0100)]
recover `#[attr] if expr {}`

4 years agorecover on 'mut', 'var', 'auto'
Mazdak Farrokhzad [Tue, 3 Dec 2019 17:08:19 +0000 (18:08 +0100)]
recover on 'mut', 'var', 'auto'

4 years agointroduce 'type AttrVec'
Mazdak Farrokhzad [Tue, 3 Dec 2019 15:38:34 +0000 (16:38 +0100)]
introduce 'type AttrVec'

4 years agosimplify parse_bottom_expr more
Mazdak Farrokhzad [Tue, 3 Dec 2019 15:38:08 +0000 (16:38 +0100)]
simplify parse_bottom_expr more

4 years agouse mk_expr_err more
Mazdak Farrokhzad [Tue, 3 Dec 2019 14:32:05 +0000 (15:32 +0100)]
use mk_expr_err more

4 years agoextract parse_lit_expr and simplify
Mazdak Farrokhzad [Tue, 3 Dec 2019 14:31:45 +0000 (15:31 +0100)]
extract parse_lit_expr and simplify

4 years agoextract parse_break_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 14:06:34 +0000 (15:06 +0100)]
extract parse_break_expr

4 years agorefactor parse_incorrect_await_syntax
Mazdak Farrokhzad [Tue, 3 Dec 2019 13:21:03 +0000 (14:21 +0100)]
refactor parse_incorrect_await_syntax

4 years agoextract parse_{expr_opt, return_expr, yield_expr}
Mazdak Farrokhzad [Tue, 3 Dec 2019 13:01:24 +0000 (14:01 +0100)]
extract parse_{expr_opt, return_expr, yield_expr}

4 years agorecover on 'do catch { .. }'
Mazdak Farrokhzad [Tue, 3 Dec 2019 12:35:05 +0000 (13:35 +0100)]
recover on 'do catch { .. }'

4 years agopass attr as param in new methods
Mazdak Farrokhzad [Tue, 3 Dec 2019 12:14:50 +0000 (13:14 +0100)]
pass attr as param in new methods

4 years agoadd recovery to parse_labeled_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 12:11:34 +0000 (13:11 +0100)]
add recovery to parse_labeled_expr

4 years agoextract parse_labeled_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 11:48:08 +0000 (12:48 +0100)]
extract parse_labeled_expr

4 years agoextract parse_path_start_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 11:43:45 +0000 (12:43 +0100)]
extract parse_path_start_expr

4 years agoextract parse_array_or_repeat_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 10:49:56 +0000 (11:49 +0100)]
extract parse_array_or_repeat_expr

4 years agoextract parse_tuple_parens_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 10:36:40 +0000 (11:36 +0100)]
extract parse_tuple_parens_expr

4 years agoClean up `parse_bottom_expr`
A C [Mon, 16 Sep 2019 20:45:43 +0000 (21:45 +0100)]
Clean up `parse_bottom_expr`

4 years agoAdd a UI test for correct parsing
A C [Mon, 16 Sep 2019 20:45:13 +0000 (21:45 +0100)]
Add a UI test for correct parsing

4 years agoparse_bottom_expr: use else if
Mazdak Farrokhzad [Tue, 3 Dec 2019 09:30:40 +0000 (10:30 +0100)]
parse_bottom_expr: use else if

4 years agoimplement recovery in check_assoc_op
Mazdak Farrokhzad [Tue, 3 Dec 2019 09:19:58 +0000 (10:19 +0100)]
implement recovery in check_assoc_op

4 years agoextract should_continue_as_assoc_expr
Mazdak Farrokhzad [Tue, 3 Dec 2019 08:04:36 +0000 (09:04 +0100)]
extract should_continue_as_assoc_expr

4 years agoextract: error_block_no_opening_brace
Mazdak Farrokhzad [Tue, 3 Dec 2019 07:20:19 +0000 (08:20 +0100)]
extract: error_block_no_opening_brace

4 years agoparser: extract error_outer_attrs
Mazdak Farrokhzad [Tue, 3 Dec 2019 06:40:18 +0000 (07:40 +0100)]
parser: extract error_outer_attrs

4 years agoparse_stmt_without_recovery: readability!
Mazdak Farrokhzad [Tue, 3 Dec 2019 06:33:25 +0000 (07:33 +0100)]
parse_stmt_without_recovery: readability!

4 years agoparse_stmt_mac: add a comment
Mazdak Farrokhzad [Tue, 3 Dec 2019 06:23:09 +0000 (07:23 +0100)]
parse_stmt_mac: add a comment

4 years agoextract suggest_slice_pat
Mazdak Farrokhzad [Tue, 3 Dec 2019 06:13:59 +0000 (07:13 +0100)]
extract suggest_slice_pat

4 years agoparser: early return for item stmt
Mazdak Farrokhzad [Tue, 3 Dec 2019 04:50:05 +0000 (05:50 +0100)]
parser: early return for item stmt

4 years agoinline parse_stmt_ into parse_stmt
Mazdak Farrokhzad [Tue, 3 Dec 2019 04:39:00 +0000 (05:39 +0100)]
inline parse_stmt_ into parse_stmt

4 years agoextract parse_sttmt_mac
Mazdak Farrokhzad [Tue, 3 Dec 2019 04:37:12 +0000 (05:37 +0100)]
extract parse_sttmt_mac

4 years agoreduce repetition in stmt parsing
Mazdak Farrokhzad [Mon, 2 Dec 2019 08:32:54 +0000 (09:32 +0100)]
reduce repetition in stmt parsing

4 years agointo: simplify AddressOf logic after rebase
Mazdak Farrokhzad [Fri, 20 Dec 2019 21:39:20 +0000 (22:39 +0100)]
into: simplify AddressOf logic after rebase

4 years agoaddress review comments
Mazdak Farrokhzad [Thu, 19 Dec 2019 09:42:07 +0000 (10:42 +0100)]
address review comments

4 years ago1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
Mazdak Farrokhzad [Mon, 16 Dec 2019 16:28:40 +0000 (17:28 +0100)]
1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
2. mir::Mutability -> ast::Mutability.

4 years agoRollup merge of #67428 - Centril:ibp-explicit-match, r=matthewjasper
Mazdak Farrokhzad [Fri, 20 Dec 2019 21:05:36 +0000 (22:05 +0100)]
Rollup merge of #67428 - Centril:ibp-explicit-match, r=matthewjasper

`is_binding_pat`: use explicit match & include or-pats in grammar

r? @matthewjasper @nikomatsakis

4 years agoRollup merge of #67404 - mark-i-m:split-1, r=matthewjasper
Mazdak Farrokhzad [Fri, 20 Dec 2019 21:05:35 +0000 (22:05 +0100)]
Rollup merge of #67404 - mark-i-m:split-1, r=matthewjasper

Separate region inference logic from error handling better

Split out from #67241

r? @matthewjasper

4 years agoRollup merge of #67392 - csmoe:async-typeinfo, r=estebank
Mazdak Farrokhzad [Fri, 20 Dec 2019 21:05:33 +0000 (22:05 +0100)]
Rollup merge of #67392 - csmoe:async-typeinfo, r=estebank

Fix unresolved type span inside async object

Closes #65180
r? @estebank
It's hard to create a minimal repro for that issue, [decided](https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/meeting.202019.2E12.2E17/near/183675659) to give up finding mcve.
cc [previous take](https://github.com/rust-lang/rust/pull/65668)