Mazdak Farrokhzad
e32bd69d0f
extract parse_pat_mac_invoc
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
231da7e044
extract ban_pat_range_if_ambiguous
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
3b651330e0
extract recover_pat_ident_mut_first
2019-08-12 12:50:44 +02:00
Mazdak Farrokhzad
c69b3ede8a
extract parse_pat_tuple_or_parens
2019-08-12 09:28:49 +02:00
Mazdak Farrokhzad
90793c0f12
extract parse_pat_deref
2019-08-12 09:28:49 +02:00
Mazdak Farrokhzad
a4af9d1ac2
parse_pat_with_range_pat: remove unnecessary assignments.
2019-08-12 09:28:49 +02:00
Mazdak Farrokhzad
bcfcbfc923
parser: {check,expect}_lifetime into ty.rs
2019-08-11 20:46:34 +02:00
Mazdak Farrokhzad
385d07f359
parser: move into generics.rs
2019-08-11 20:44:09 +02:00
Mazdak Farrokhzad
d6d93b3d82
parser: move into stmt.rs
2019-08-11 20:32:29 +02:00
Mazdak Farrokhzad
28db7c5968
parser: move parse_fn_block_decl into expr.rs
2019-08-11 20:04:09 +02:00
Mazdak Farrokhzad
848ec4aa3c
parser: move parse_ident_or_underscore into item.rs
2019-08-11 20:00:38 +02:00
Mazdak Farrokhzad
3dbfbafe3e
parser: split into {ty, path}.rs
2019-08-11 19:59:27 +02:00
Mazdak Farrokhzad
e81347c368
parser: split into {item,module}.rs
2019-08-11 18:34:42 +02:00
Mazdak Farrokhzad
e742de2569
parser: split into pat.rs
2019-08-11 15:24:37 +02:00
Mazdak Farrokhzad
81e6b5094e
parser: split into expr.rs
2019-08-11 13:14:30 +02:00
Esteban Küber
b7f7756566
Recover parser from foo(_, _)
2019-08-09 07:18:05 -07:00
Aleksey Kladov
58ac81a60f
add unknown token
2019-08-05 13:15:11 +03:00
Aleksey Kladov
b5e35b128e
remove special code path for unknown tokens
2019-08-05 13:15:11 +03:00
bors
d3f8a0b5df
Auto merge of #63213 - varkor:itemkind-tyalias, r=Centril
...
Rename `ItemKind::Ty` to `ItemKind::TyAlias`
The current name is not entirely clear without context and `TyAlias` is consistent with `ItemKind::TraitAlias`.
2019-08-04 20:03:28 +00:00
varkor
63659ca9f6
Rename ItemImplKind::Type to ItemImplKind::TyAlias
2019-08-04 20:16:41 +01:00
varkor
8aa45c65d8
Rename ItemKind::Ty to ItemKind::TyAlias
2019-08-04 20:13:37 +01:00
bors
f01b9f803b
Auto merge of #62816 - estebank:type-ascription-macros, r=petrochenkov
...
Point at type ascription before macro invocation on expansion parse error
Fix https://github.com/rust-lang/rust/issues/47666 . Follow up to https://github.com/rust-lang/rust/pull/62791 .
r? @petrochenkov
2019-08-04 16:19:04 +00:00
Mazdak Farrokhzad
15b5aacab6
Rollup merge of #63146 - Mark-Simulacrum:clean-attr, r=petrochenkov
...
Cleanup syntax::attr
Mostly removing needless arguments to constructors
r? @petrochenkov
2019-08-03 13:11:59 +02:00
bors
d7270712cb
Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centril
...
Change opaque type syntax from `existential type` to type alias `impl Trait`
This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature.
The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC.
This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063 .
r? @Centril
2019-08-03 02:21:23 +00:00
bors
cf048cc115
Auto merge of #63207 - petrochenkov:outest2, r=Mark-Simulacrum
...
Unconfigure compiler unit test files during normal build
I haven't touched libstd though, it had a lot of tests and I'm not sure the people maintaining it want this.
Closes https://github.com/rust-lang/rust/issues/61097
r? @Mark-Simulacrum
2019-08-02 15:22:50 +00:00
Mazdak Farrokhzad
3396550420
Rollup merge of #63202 - exphp-forks:parser-ice-63135, r=estebank
...
Fix ICE in #63135
Closes #63135 .
r?@estebank
2019-08-02 12:14:21 +02:00
Mazdak Farrokhzad
dbfe12daed
Rollup merge of #63189 - waywardmonkeys:doc-improvements, r=Centril
...
Doc improvements
Miscellaneous documentation fixes.
2019-08-02 12:14:18 +02:00
varkor
c28ce3e4ca
Replace "existential" by "opaque"
2019-08-02 02:44:36 +01:00
varkor
87738fe834
Switch existential_type to type_alias_impl_trait
2019-08-02 02:44:35 +01:00
Vadim Petrochenkov
310b9fc760
libsyntax: Unconfigure tests during normal build
2019-08-02 01:59:01 +03:00
Michael Lamparski
b3321fb26e
Fix ICE in #63135
2019-08-01 17:34:00 -04:00
Bruce Mitchener
86633b6389
Fix typos in doc comments.
2019-08-02 01:36:36 +07:00
Pietro Albini
7a7fcad675
Rollup merge of #63170 - matklad:cleanup-fields, r=petrochenkov
...
cleanup StringReader fields
reduce visibility and replace `Lrc<SourceFile>` with `start_pos`: the single bit we actually *need* from the file.
r? @petrochenkov
2019-08-01 16:00:29 +02:00
Pietro Albini
810ffe2ba0
Rollup merge of #63122 - Centril:fix-63115, r=petrochenkov
...
Account for `maybe_whole_expr` in range patterns
Fixes https://github.com/rust-lang/rust/issues/63115 (fallout from https://github.com/rust-lang/rust/pull/62550 ).
r? @petrochenkov
2019-08-01 16:00:26 +02:00
Mazdak Farrokhzad
6551285cca
Address review comments.
2019-07-31 21:25:11 +02:00
Aleksey Kladov
3f461f5ec6
cleanup StringReader fields
2019-07-31 20:25:10 +03:00
Mark Rousskov
c9bd4a05bf
Replace a few Attribute constructors with mk_attr
2019-07-31 08:55:37 -04:00
Mark Rousskov
0a42badd4c
Remove AttrId from Attribute constructors
2019-07-31 08:55:37 -04:00
Esteban Küber
c82e1f2d0e
Point at type ascription before macro invocation on expansion parse error
2019-07-30 09:16:27 -07:00
Mazdak Farrokhzad
758931948f
Unsupport the await!(..) macro.
2019-07-30 10:55:45 +02:00
Mazdak Farrokhzad
36029878e7
Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebank
...
Syntax: Recover on `for ( $pat in $expr ) $block`
Fixes #62724 by adding some recovery:
```
error: unexpected closing `)`
--> $DIR/recover-for-loop-parens-around-head.rs:10:23
|
LL | for ( elem in vec ) {
| --------------^
| |
| opening `(`
| help: remove parenthesis in `for` loop: `elem in vec`
```
The last 2 commits are drive-by cleanups.
r? @estebank
2019-07-30 05:37:32 +02:00
Mazdak Farrokhzad
f3a3290ba3
Account for maybe_whole_expr in range patterns.
2019-07-30 04:22:09 +02:00
Mazdak Farrokhzad
a4cd2ecab2
Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasper
...
Lint attributes on function arguments
Fixes #61238 .
cc #60406
2019-07-28 21:19:50 +02:00
Mazdak Farrokhzad
56b39fba56
Add 'span_to_snippet' shortcut.
2019-07-28 20:43:09 +02:00
Mazdak Farrokhzad
1b118607ec
Use chaining for diagnosics in parser.
2019-07-28 20:43:09 +02:00
Mazdak Farrokhzad
dfad725be5
Recover 'for ( $pat in $expr ) $block'.
2019-07-28 20:43:09 +02:00
Mazdak Farrokhzad
75e23ff411
Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkov
...
Implement RFC 2707 + Parser recovery for range patterns
Implement https://github.com/rust-lang/rfcs/pull/2707 .
- Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result.
- Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later).
- Refactor `parser.rs` wrt. parsing sequences and lists of things in the process.
- Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`.
This should make it easy to actually support these patterns semantically later if we so desire.
cc https://github.com/rust-lang/rust/issues/62254
r? @petrochenkov
2019-07-28 11:11:04 +02:00
Mazdak Farrokhzad
becdba80ea
Address comments in lowering + parsing.
2019-07-28 06:53:39 +02:00
Mazdak Farrokhzad
2f55354759
Recover on 'X..' / 'X..=' / 'X...' range patterns.
2019-07-28 06:53:38 +02:00
Mazdak Farrokhzad
974413fcc5
Recover on '..X' / '..=X' / '...X' range patterns.
2019-07-28 06:53:38 +02:00