summary refs log tree commit diff
path: root/src/librustc_parse
AgeCommit message (Collapse)AuthorLines
2020-01-17Change `next_point` when `shrink_to_hi` is more appropriateEsteban Küber-10/+8
(cherry picked from commit b93ef68245807bac97cd17ea9eaa13169380d815)
2020-01-17Do not ICE on unicode next pointEsteban Küber-1/+1
Use `shrink_to_hi` instead of `next_point` Fix #68000. (cherry picked from commit fcd850fc5db2501d14b2e0cbfac8aa890d700e55)
2020-01-17expect `fn` after `const unsafe` / `const extern`Mazdak Farrokhzad-1/+1
(cherry picked from commit 915db7ae6430baef99f186ba40f08e105b7694fe)
2019-12-13parser: recover on `&'lifetime mut $pat`.Mazdak Farrokhzad-6/+16
2019-12-07Make `ForeignItem` an alias of `Item`.Mazdak Farrokhzad-1/+5
2019-12-06Rollup merge of #67078 - kamleshbhalui:master, r=CentrilMazdak Farrokhzad-2/+3
accept union inside enum if not followed by identifier Fixes #66943
2019-12-06Rollup merge of #67052 - Centril:config-1, r=petrochenkovMazdak Farrokhzad-105/+121
Ditch `parse_in_attr` Fixes #66940 r? @petrochenkov
2019-12-06parse_meta: ditch parse_in_attrMazdak Farrokhzad-37/+56
2019-12-06derive: avoid parse_in_attrMazdak Farrokhzad-38/+1
2019-12-06cfg_attr: avoid .outer_tokensMazdak Farrokhzad-64/+98
2019-12-06Fix rebase issuesvarkor-0/+1
2019-12-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-1/+1
2019-12-06accept union inside enum if not followed by identifierKamlesh Kumar-2/+3
2019-12-05Rollup merge of #67045 - Centril:parser-import-clean, r=Mark-SimulacrumMazdak Farrokhzad-75/+58
rustc_parser: cleanup imports Reorganize & canonicalize some imports + Drop `rustc_target` as a dependency. r? @Mark-Simulacrum
2019-12-05rustc_parser: cleanup importsMazdak Farrokhzad-75/+58
2019-12-03Account for raw idents in module file findingEsteban Küber-2/+2
2019-12-03Rollup merge of #66903 - Centril:parse-enum-variant, r=estebankMazdak Farrokhzad-2/+2
parse_enum_item -> parse_enum_variant r? @estebank
2019-12-03Move early lint declarations to librustc_sessionMark Rousskov-2/+2
2019-12-02Address review commentsVadim Petrochenkov-1/+4
2019-12-02syntax: Use `ast::MacArgs` for macro definitionsVadim Petrochenkov-21/+19
2019-12-02syntax: Use `ast::MacArgs` for attributesVadim Petrochenkov-47/+19
2019-12-02syntax: Remove redundant span from `ast::Mac`Vadim Petrochenkov-12/+3
Also remove a couple of redundant `visit_mac` asserts
2019-12-02syntax: Introduce a struct `MacArgs` for macro argumentsVadim Petrochenkov-49/+66
2019-11-30parse_enum_item -> parse_enum_variantMazdak Farrokhzad-2/+2
2019-11-30derive(Default) for FeaturesMazdak Farrokhzad-1/+1
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-2/+1
2019-11-30inline two explanation constantsMazdak Farrokhzad-7/+2
2019-11-30builtin_attrs.rs -> rustc_featureMazdak Farrokhzad-2/+1
2019-11-30move AttributeTemplate to builtin_attrsMazdak Farrokhzad-3/+14
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-1/+2
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-3/+3
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-27Rollup merge of #66718 - VirrageS:use_comma, r=CentrilTyler Mandry-70/+67
Refactor `parse_enum_item` to use `parse_delim_comma_seq` Followup after https://github.com/rust-lang/rust/pull/66641 Some errors got more verbose but I think they make sense with the help message.
2019-11-26Fix spelling typosBrian Wignall-3/+3
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-6/+11
Various tweaks to diagnostic output
2019-11-26Refactor 'parse_enum_item' to use 'parse_delim_comma_seq'Janusz Marcinkiewicz-70/+67
2019-11-25Various cleanupsEsteban Küber-6/+11
2019-11-25Auto merge of #66671 - matthewjasper:ast-address-of, r=Centrilbors-6/+21
Ast address-of This is the parts of #64588 that don't affect MIR. If an address-of expression makes it to MIR lowering we error and lower to the best currently expressible approximation to limit further errors. r? @Centril
2019-11-24Parse and feature gate raw address of expressionsMatthew Jasper-1/+1
2019-11-24Add raw address of expressions to the AST and HIRMatthew Jasper-6/+21
2019-11-24Auto merge of #66592 - estebank:raw-raw-ah-ah-ah, r=cramertjbors-1/+14
Rework raw ident suggestions Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion. Fix #66126.
2019-11-23Rework raw ident suggestionsEsteban Küber-1/+14
Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion.
2019-11-23Add FIXME for using 'parse_delim_comma_seq' when parsing enum variantsJanusz Marcinkiewicz-0/+2
2019-11-23Cleanup code after review fixesJanusz Marcinkiewicz-14/+11
2019-11-23Add error reporting on nested keywords inside 'enum' definitionJanusz Marcinkiewicz-1/+36
2019-11-22Rollup merge of #66183 - Centril:empty-vis-trait-decl, r=petrochenkovMazdak Farrokhzad-30/+16
*Syntactically* permit visibilities on trait items & enum variants Fixes #65041 Suppose we have `$vis trait_item` or `$vis enum_variant` and `$vis` is a `:vis` macro fragment. Before this PR, this would fail to parse. This is now instead allowed as per language team consensus in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286. (See added tests for elaboration.) Moreover, we now also permit visibility modifiers on trait items & enum variants *syntactically* but reject them with semantic checks (in `ast_validation`): ```rust #[cfg(FALSE)] trait Foo { pub fn bar(); } // OK #[cfg(FALSE)] enum E { pub U } // OK ```
2019-11-20Delete ProcessCfgModMark Rousskov-1/+0
The previous commit removes the use of this, and now we cleanup.
2019-11-19Move syntax_expand::config to rustc_parse::configMark Rousskov-1/+378
2019-11-17Address review commentsVadim Petrochenkov-0/+3
2019-11-16parse: Use string literal parsing in the `asm` macroVadim Petrochenkov-45/+31