Aleksey Kladov
940b3afd00
internal: fix bugs in tests by simplifying code
2021-09-13 13:29:27 +03:00
Aleksey Kladov
4452f9ec48
internal: improve style
...
Group related stuff together, use only on path for parsing extern blocks
(they actually have modifiers).
Perhaps we should get rid of items_without_modifiers altogether? Better
to handle these kinds on diagnostics in validation layer...
2021-08-30 15:55:40 +03:00
Aleksey Kladov
8dc3b46017
fix: avoid panic when parsing extern block
...
closes #10083
2021-08-30 15:40:47 +03:00
Jonas Schievink
d568e7686a
Support if let
match guards
2021-08-13 00:25:14 +02:00
Jade
775670e32c
Split the test
2021-08-04 03:01:48 -07:00
Jade
b90ed92a5c
Support exclusive_range_pattern
...
Fix #9779
2021-08-03 21:36:29 -07:00
Lukas Wirth
f04cff102f
Simplify
2021-07-30 13:12:52 +02:00
Lukas Wirth
4de447b293
Attach comma token to MATCH_ARM instead of MATCH_ARM_LIST
2021-07-29 23:02:52 +02:00
Lukas Wirth
f43cd562bc
Fix generic_arg not parsing opt_generic_arg_list properly in arg lists
2021-07-26 15:21:19 +02:00
bors[bot]
ea105f9396
Merge #9619
...
9619: Support GATs for associated type arg parsing r=Veykril a=Veykril
Fixes #9602
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-18 09:10:56 +00:00
Lukas Wirth
e7aa37c20a
Support GATs for associated type arg parsing
2021-07-18 11:08:43 +02:00
Aleksey Kladov
15f11dce4a
feat: improve parser error recovery for function parameters
2021-07-17 22:41:04 +03:00
Lukas Wirth
02d25ab60d
Fix parser tests for 1.53
2021-06-17 18:09:44 +02:00
Aleksey Kladov
067e97d149
internal: enforce no #[ignore] and no #[should_panic]
2021-06-15 16:54:43 +03:00
Jonas Schievink
1d6eef1350
Update ungrammar
2021-06-11 18:34:30 +02:00
Lukas Wirth
4b5b54279a
Attach comments to ast::Impl
2021-05-15 17:32:28 +02:00
Jonas Schievink
cb8632d87c
Parse const param defaults
2021-04-29 03:07:53 +02:00
Jonas Schievink
caee3a2eeb
Correctly parse negated literals as const args
2021-04-29 02:27:55 +02:00
Lukas Wirth
3f7a086b4f
Parse outer atttributes for RecordPatField
2021-04-21 11:08:15 +02:00
Aleksey Kladov
5f89a60f1a
fix: false positive about inner attrs in docs
...
closes #8541
2021-04-19 17:11:49 +03:00
cynecx
cf3b4f1e20
hir_ty: Expand macros at type position
2021-04-17 16:24:56 +02:00
Jonas Schievink
022a0f061e
Correctly parse attributes on fn parameters
2021-03-17 18:28:27 +01:00
Arnaud
95d239da99
Specialization for async traits
2021-02-15 18:33:12 +01:00
Aleksey Kladov
4b1279d0b1
Infra for "unit" benchmarking
2021-02-09 20:25:39 +03:00
Lukas Wirth
70d43c3faf
Add validation for mutable const items
2021-01-24 02:17:41 +01:00
Lukas Wirth
b26002410b
Parse impl const Trait
2021-01-18 20:18:02 +01:00
Lukas Wirth
98718e0544
Wrap remaining self/super/crate in Name{Ref}
2021-01-15 22:18:43 +01:00
Lukas Wirth
cb863390f2
Handle self/super/crate in PathSegment as NameRef
2021-01-15 19:21:23 +01:00
Daiki Ihara
138514bea2
Add test for yield_expr
2021-01-15 23:35:17 +09:00
bors[bot]
607b9ea160
Merge #7218
...
7218: Fix typos r=Veykril a=regexident
Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking.
Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-01-10 18:16:29 +00:00
Vincent Esche
d462119744
Updated tests via cargo xtask codegen
2021-01-10 18:36:27 +01:00
Callym
dcb4c0ada6
Allow true
and false
keywords in const generics
2021-01-10 13:58:09 +00:00
Marijn Suijten
42da26e959
parser,syntax: Add separate parser for stmt with optional semicolon
...
Adjusting `grammar::fragments::stmt` to Optional or Yes will break
original functionality and tests.
2021-01-03 12:05:52 +01:00
Marijn Suijten
cc081b7e1c
syntax,ssr: Implement statement parsing
2021-01-03 11:29:33 +01:00
Lukas Wirth
3e0bb89541
Fix macro_rules not accepting brackets or parentheses
2020-12-24 09:36:47 +01:00
Lukas Wirth
2c94c4964a
Parse const effect block
2020-12-23 02:15:44 +01:00
Lukas Wirth
03a9bbacf2
Parse ConstBlockPat
2020-12-23 01:49:43 +01:00
bors[bot]
9bb9fbab3a
Merge #6965
...
6965: Properly attach attributes to Param instead of parent ParamList r=matklad a=Veykril
Fixes #2783 , fixes #2781
The problem with `let _a = [0,#[cfg(feature = "L")]0];` has already been fixed some time ago it seems:
<details>
<summary>Syntax Tree for the const item</summary>
```
LET_STMT@200..236
LET_KW@200..203 "let"
WHITESPACE@203..204 " "
IDENT_PAT@204..206
NAME@204..206
IDENT@204..206 "_a"
WHITESPACE@206..207 " "
EQ@207..208 "="
WHITESPACE@208..209 " "
ARRAY_EXPR@209..235
L_BRACK@209..210 "["
LITERAL@210..211
INT_NUMBER@210..211 "0"
COMMA@211..212 ","
LITERAL@212..234
ATTR@212..233
POUND@212..213 "#"
L_BRACK@213..214 "["
PATH@214..217
PATH_SEGMENT@214..217
NAME_REF@214..217
IDENT@214..217 "cfg"
TOKEN_TREE@217..232
L_PAREN@217..218 "("
IDENT@218..225 "feature"
WHITESPACE@225..226 " "
EQ@226..227 "="
WHITESPACE@227..228 " "
STRING@228..231 "\"L\""
R_PAREN@231..232 ")"
R_BRACK@232..233 "]"
INT_NUMBER@233..234 "0"
R_BRACK@234..235 "]"
SEMICOLON@235..236 ";"
```
</details>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-21 08:54:31 +00:00
Lukas Wirth
3ea4d43850
Properly parse legacy trait objects with leading ForType
2020-12-20 21:53:55 +01:00
Lukas Wirth
64caa027b8
Parse attributes in tuple expressions
2020-12-20 21:01:36 +01:00
Lukas Wirth
4be9ed675e
Properly attach attributes to Param instead of parent ParamList
2020-12-20 20:30:18 +01:00
Lukas Wirth
dd496223f5
Node-ify lifetimes
2020-12-16 14:16:09 +01:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
Lukas Wirth
a1c8bdecfd
Use items can also have doc comments
2020-12-04 17:09:40 +01:00
David Tolnay
8a11da40a7
Parse unsafe extern block
2020-11-22 20:44:56 -08:00
Aleksey Kladov
a27186636d
Fix attachment of inner doc comments
2020-11-12 12:09:12 +01:00
Aleksey Kladov
5ba4f949c2
Kill RAW_ literals
...
Syntactically, they are indistinguishable from non-raw versions, so it
doesn't make sense to separate then *at the syntax* level.
2020-11-06 22:23:14 +01:00
Arif Roktim
0a9ff04270
Don't interpret type path as part of visibility.
2020-10-24 02:20:45 -04:00
Lukas Wirth
6f38552edb
Add validation check for ambiguous trait objects
2020-10-06 23:52:00 +02:00
Pavan Kumar Sunkara
4d97f5f037
Rename record_field_pat to record_pat_field
2020-09-10 18:56:04 +02:00