about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2019-04-01Rollup merge of #59041 - saleemjaffer:trait_doc_comment_better_error_msg, ↵Mazdak Farrokhzad-0/+16
r=pnkfelix fixes rust-lang#56766 fixes #56766
2019-03-30Rollup merge of #59453 - estebank:recover-tuple-parse, r=petrochenkovMazdak Farrokhzad-26/+57
Recover from parse error in tuple syntax
2019-03-28Deduplicate parse recovery codeEsteban Küber-35/+43
2019-03-28Recover from parse error in tuple syntaxEsteban Küber-8/+31
2019-03-28Rollup merge of #59198 - estebank:recovered-pattern, r=zackmdavisMazdak Farrokhzad-1/+1
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-27Rollup merge of #59421 - estebank:tuple-index-suffix, r=petrochenkovJosh Stone-50/+52
Reject integer suffix when tuple indexing Fix #59418. r? @varkor
2019-03-27Rollup merge of #57565 - petrochenkov:turbowarn, r=CentrilJosh Stone-21/+10
syntax: Remove warning for unnecessary path disambiguators `rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in https://github.com/rust-lang/rust/pull/43540 (where it was introduced). One hardcoded warning less. Closes https://github.com/rust-lang/rust/issues/58055 r? @nikomatsakis
2019-03-26Add specific message for tuple struct invoked with suffixed numeric field nameEsteban Küber-1/+2
2019-03-26Reword invalid suffixe errorsEsteban Küber-7/+6
2019-03-26Use `expect_no_suffix` for errorEsteban Küber-8/+1
2019-03-26Rollup merge of #59150 - estebank:type-ascription, r=varkorMazdak Farrokhzad-13/+62
Expand suggestions for type ascription parse errors Fix #51222. CC #48016, #47666, #54516, #34255.
2019-03-25review commentsEsteban Küber-1/+1
2019-03-25Reject integer suffix when tuple indexingEsteban Küber-43/+52
2019-03-24Separate variant id and variant constructor id.David Wood-5/+6
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
2019-03-23Tweak unsupported negative trait bounds messageEsteban Küber-7/+14
2019-03-23syntax: Remove warning for unnecessary path disambiguatorsVadim Petrochenkov-21/+10
2019-03-23Auto merge of #59058 - petrochenkov:assocrecov3, r=estebankbors-88/+82
syntax: Better recovery for `$ty::AssocItem` and `ty!()::AssocItem` This PR improves on https://github.com/rust-lang/rust/pull/46788 covering a few missing cases. Fixes https://github.com/rust-lang/rust/issues/52307 Fixes https://github.com/rust-lang/rust/issues/53776 r? @estebank
2019-03-22Reword type ascription note to reduce verbosityEsteban Küber-5/+1
2019-03-22Review commentEsteban Küber-2/+2
2019-03-22Expand suggestions for type ascription parse errorsEsteban Küber-13/+66
2019-03-22Rollup merge of #59322 - estebank:diag-tweak, r=davidtwcoMazdak Farrokhzad-4/+9
Tweak incorrect escaped char diagnostic
2019-03-22Rollup merge of #59266 - estebank:struct-parse-recovery, r=petrochenkovMazdak Farrokhzad-10/+20
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-22Auto merge of #59031 - estebank:recover-from-comaless, r=petrochenkovbors-3/+33
Recover from missing comma between enum variants and from bad `pub` kw Fix #56579. Fix #56473.
2019-03-20Tweak incorrect escaped char diagnosticEsteban Küber-4/+9
2019-03-19review commentsEsteban Küber-1/+3
2019-03-18Auto merge of #58872 - rep-nop:diagnostic-fix-56031, r=petrochenkovbors-3/+11
Adds help message in error for invalid `impl for T` syntax Fixes #56031.
2019-03-17Do not complain about non-existing fields after parse recoveryEsteban Küber-10/+18
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-16Simplify checkEsteban Küber-5/+1
2019-03-16parse full visibility when recoveringEsteban Küber-5/+9
2019-03-16Recover from incorrect `pub` kw in "reasonable" placesEsteban Küber-1/+13
2019-03-16Recover from missing comma between enum variantsEsteban Küber-2/+20
2019-03-16Rename `MetaItem::ident` to `MetaItem::path`Vadim Petrochenkov-1/+1
2019-03-16syntax: Introduce `Ident::can_be_raw`Vadim Petrochenkov-3/+1
2019-03-14Do not complain about unmentioned fields in recovered patternsEsteban Küber-1/+1
When the parser has to recover from malformed code in a pattern, do not complain about missing fields.
2019-03-13add suggestions to invalid macro item errorAndy Russell-20/+25
2019-03-12Address review commentsVadim Petrochenkov-2/+6
2019-03-12syntax: Optimize `maybe_whole`/`maybe_whole_expr` slightlyVadim Petrochenkov-14/+14
2019-03-12syntax: Better recovery for `$ty::AssocItem` and `ty!()::AssocItem`Vadim Petrochenkov-73/+63
2019-03-09fixes rust-lang#56766Saleem Jaffer-0/+16
2019-03-09Auto merge of #59012 - pietroalbini:rollup, r=pietroalbinibors-24/+28
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
2019-03-08Improve recovery for missing trait in a trait implVadim Petrochenkov-11/+11
2019-03-07Adds diagnostic message and UI test.Wesley Norris-1/+9
2019-03-06Rely on drop to emit unclosed delimsEsteban Küber-1/+0
2019-03-06Simplify codeEsteban Küber-4/+2
2019-03-06Always emit mismatched delim errors, never panicEsteban Küber-3/+2
2019-03-06Collect unclosed delimiters in parent parserEsteban Küber-4/+13
2019-03-06Emit missing unclosed delimiter errorsEsteban Küber-5/+9
2019-03-06Panic when unmatched delimiters aren't emittedEsteban Küber-0/+7
2019-03-06Emit unclosed delimiters during recoveryEsteban Küber-0/+1
2019-03-06Bail when encountering a second unexpected token in the same spanEsteban Küber-4/+10