rchaser53
199b0bad3c
improve error messages
2019-04-12 00:27:46 +09:00
rchaser53
89eac91e05
Improvement for comparision against fn
2019-04-07 23:15:35 +09:00
Mazdak Farrokhzad
d2fd3fe957
Rollup merge of #59041 - saleemjaffer:trait_doc_comment_better_error_msg, r=pnkfelix
...
fixes rust-lang#56766
fixes #56766
2019-04-01 17:29:53 +02:00
Mazdak Farrokhzad
61222b5731
Rollup merge of #59572 - davidtwco:issue-59508, r=varkor
...
Include bounds in generic re-ordering diagnostic
Fixes #59508 .
r? @estebank
cc @varkor
2019-03-31 16:10:37 +02:00
David Wood
0270d565d9
Only mention const generics if enabled.
...
This commit updates the generic parameter re-ordering diagnostic to only
mention const generics if the feature is enabled.
2019-03-31 00:14:21 +01:00
Mazdak Farrokhzad
c28704c2a8
Rollup merge of #59453 - estebank:recover-tuple-parse, r=petrochenkov
...
Recover from parse error in tuple syntax
2019-03-30 07:51:36 +01:00
Esteban Küber
3592079765
revert change to test file as per review request
2019-03-29 06:41:15 -07:00
Mazdak Farrokhzad
fda206633d
Rollup merge of #59467 - hgallagher1993:local_branch, r=estebank
...
Better diagnostic for binary operation on BoxedValues
Fixes #59458
2019-03-29 12:32:26 +01:00
Esteban Küber
b7dc8e71cc
fix text after rebase
2019-03-28 19:58:00 -07:00
Mazdak Farrokhzad
06a9196055
Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk
...
compiletest: make path normalization smarter
Fixes #59109 .
2019-03-28 13:35:43 +01:00
Esteban Küber
e3918cf621
Recover from parse error in tuple syntax
2019-03-28 04:47:37 -07:00
Mazdak Farrokhzad
dcd531ea15
Rollup merge of #59198 - estebank:recovered-pattern, r=zackmdavis
...
Do not complain about unmentioned fields in recovered patterns
When the parser has to recover from malformed code in a pattern, do not
complain about missing fields.
Fix #59145 .
2019-03-28 08:43:32 +01:00
Josh Stone
be34621ffc
Rollup merge of #59421 - estebank:tuple-index-suffix, r=petrochenkov
...
Reject integer suffix when tuple indexing
Fix #59418 .
r? @varkor
2019-03-27 18:15:35 -07:00
hgallagher1993
4d648ce1b9
Better diagnostic for binary operation on BoxedValues
2019-03-27 13:13:09 -04:00
Esteban Küber
8d1cc72cf9
Add specific message for tuple struct invoked with suffixed numeric field name
2019-03-26 12:32:32 -07:00
Esteban Küber
1bb3694b1a
Reword invalid suffixe errors
2019-03-26 12:09:13 -07:00
Esteban Küber
c7ddb83980
Use expect_no_suffix for error
2019-03-26 10:18:18 -07:00
Mazdak Farrokhzad
b316514dbd
Rollup merge of #59150 - estebank:type-ascription, r=varkor
...
Expand suggestions for type ascription parse errors
Fix #51222 . CC #48016 , #47666 , #54516 , #34255 .
2019-03-26 09:05:39 +01:00
Esteban Küber
6ad77b0938
review comments
2019-03-25 21:38:23 -07:00
Esteban Küber
91b7423760
Reject integer suffix when tuple indexing
2019-03-25 16:11:21 -07:00
Andy Russell
695dfe7dff
compiletest: make path normalization smarter
2019-03-25 01:06:45 -04:00
Esteban Küber
9bfb0ef818
Tweak unsupported negative trait bounds message
2019-03-23 13:05:30 -07:00
Esteban Küber
d72ef21ddd
Reword type ascription note to reduce verbosity
2019-03-22 20:14:20 -07:00
Esteban Küber
44a086ef39
Review comment
2019-03-22 19:50:18 -07:00
Esteban Küber
8ba1a97e37
Expand suggestions for type ascription parse errors
2019-03-22 19:50:18 -07:00
Mazdak Farrokhzad
9d33d6fa4b
Rollup merge of #59322 - estebank:diag-tweak, r=davidtwco
...
Tweak incorrect escaped char diagnostic
2019-03-22 19:31:34 +01:00
Mazdak Farrokhzad
5a0e4510a8
Rollup merge of #59266 - estebank:struct-parse-recovery, r=petrochenkov
...
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fix #57361 .
2019-03-22 19:31:24 +01:00
Esteban Küber
a8120d660a
Tweak incorrect escaped char diagnostic
2019-03-20 11:45:25 -07:00
Esteban Küber
6007e6f649
Do not complain about non-existing fields after parse recovery
...
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
2019-03-17 20:09:53 -07:00
Esteban Küber
b2b9555f95
Recover from incorrect pub kw in "reasonable" places
2019-03-16 17:47:57 -07:00
Esteban Küber
532dd4475b
Recover from missing comma between enum variants
2019-03-16 17:47:00 -07:00
Vadim Petrochenkov
6ad55b3dec
syntax: Introduce Ident::can_be_raw
2019-03-16 23:13:15 +03:00
Esteban Küber
6cd6759cfc
Do not complain about unmentioned fields in recovered patterns
...
When the parser has to recover from malformed code in a pattern, do not
complain about missing fields.
2019-03-14 18:28:24 -07:00
Andy Russell
5abd6d9492
add suggestions to invalid macro item error
2019-03-13 15:24:36 -04:00
Saleem Jaffer
d258481625
tidy test
2019-03-13 11:53:06 +05:30
Saleem Jaffer
eaff0fe36f
adding test
2019-03-13 09:58:05 +05:30
Mazdak Farrokhzad
ad7b650815
Rollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkov
...
Parse lifetimes that start with a number and give specific error
Fix #58786 .
2019-03-13 03:33:36 +01:00
Vadim Petrochenkov
07f99b9fec
Update tests that don't run on my platform
2019-03-11 23:30:10 +03:00
Vadim Petrochenkov
fa72a81bea
Update tests
2019-03-11 23:10:26 +03:00
Esteban Küber
f690821d58
review comments
2019-03-09 11:08:51 -08:00
Esteban Küber
0a505a71d3
Parse lifetimes that start with a number and give specific error
2019-03-08 16:56:31 -08:00
Esteban Küber
3818f8ba34
Add regression test for #58886
2019-03-06 18:46:11 -08:00
Esteban Küber
cc535a2a19
Bail when encountering a second unexpected token in the same span
2019-03-06 18:45:59 -08:00
Dan Robertson
08bd4ff998
Rename variadic to c_variadic
...
Function signatures with the `variadic` member set are actually
C-variadic functions. Make this a little more explicit by renaming the
`variadic` boolean value, `c_variadic`.
2019-02-27 10:21:54 -05:00
Dan Robertson
58147d486b
Support defining C compatible variadic functions
...
Add support for defining C compatible variadic functions in unsafe rust
with extern "C".
2019-02-27 10:21:35 -05:00
Vadim Petrochenkov
eccc19996b
Stabilize unrestricted_attribute_tokens
2019-02-25 23:21:54 +03:00
Vadim Petrochenkov
8e1b5d897a
Restrict value in key-value attributes to literals
2019-02-25 22:40:38 +03:00
Mazdak Farrokhzad
ae646687e0
Rollup merge of #57364 - hdhoang:33418_negative_bounds, r=estebank
...
Improve parsing diagnostic for negative supertrait bounds
closes #33418
r? @estebank
2019-02-24 05:55:55 +01:00
Mazdak Farrokhzad
18dd2d2fbe
Rollup merge of #58526 - pmccarter:master, r=estebank
...
Special suggestion for illegal unicode curly quote pairs
Fixes #58436
Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark.
The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
2019-02-23 09:25:27 +01:00
Hoàng Đức Hiếu
7cfddfb4e4
Improve parsing diagnostic for negative supertrait bounds
2019-02-23 07:58:16 +07:00