about summary refs log tree commit diff
path: root/src/librustc_parse/parser/ty.rs
AgeCommit message (Collapse)AuthorLines
2020-03-26parse: recover on `const fn()` / `async fn()`.Mazdak Farrokhzad-16/+28
2020-03-12ast: `Mac`/`Macro` -> `MacCall`Vadim Petrochenkov-5/+3
2020-03-10trait-object-lifetime-parens: improve recovery.Mazdak Farrokhzad-6/+11
2020-03-10use check_path moreMazdak Farrokhzad-1/+1
2020-03-10simplify & improve parse_ty_tuple_or_parensMazdak Farrokhzad-19/+18
2020-03-09rustc_ast: Introduce `Token::uninterpolated_span`Vadim Petrochenkov-1/+1
2020-03-03Use .next() instead of .nth(0) on iterators.Matthias Krüger-1/+1
2020-03-01Rollup merge of #69579 - petrochenkov:noprevspan, r=CentrilYuki Okushi-15/+15
parser: Remove `Parser::prev_span` Follow-up to https://github.com/rust-lang/rust/pull/69384. r? @Centril
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-7/+7
2020-02-29parser: `prev_span` -> `prev_token.span`Vadim Petrochenkov-15/+15
2020-02-24parser: `token` -> `normalized_token`, `nonnormalized_token` -> `token`Vadim Petrochenkov-4/+3
2020-02-17Rename `FunctionRetTy` to `FnRetTy`Yuki Okushi-6/+4
2020-02-13parser: simplify ParamCfg -> ReqNameMazdak Farrokhzad-3/+1
2020-02-12Rollup merge of #69034 - petrochenkov:notokind, r=CentrilDylan DPC-5/+5
parser: Remove `Parser::prev_token_kind` Follow-up to https://github.com/rust-lang/rust/pull/69006. r? @Centril
2020-02-10parser: Remove `Parser::prev_token_kind`Vadim Petrochenkov-5/+5
2020-02-09[parser] change an instance of span_bug() to struct_span_err() to avoid ICEDavid Renshaw-1/+4
2020-02-05parser: merge `fn` grammars wrt. bodies & headersMazdak Farrokhzad-7/+9
also refactor `FnKind` and `visit_assoc_item` visitors
2020-02-05parse_ty_common: use `enum`s instead of `bool`s.Mazdak Farrokhzad-20/+39
2020-02-02parser: address review comments re. `self`.Mazdak Farrokhzad-2/+1
2020-02-02parser: move restrictions re. `self` to `ast_validation`.Mazdak Farrokhzad-2/+2
2020-01-21Rollup merge of #68140 - ecstatic-morse:const-trait-bound-opt-out, r=oli-obkMazdak Farrokhzad-8/+10
Implement `?const` opt-out for trait bounds For now, such bounds are treated exactly the same as unprefixed ones in all contexts. [RFC 2632](https://github.com/rust-lang/rfcs/pull/2632) does not specify whether such bounds are forbidden outside of `const` contexts, so they are allowed at the moment. Prior to this PR, the constness of a trait bound/impl was stored in `TraitRef`. Now, the constness of an `impl` is stored in `ast::ItemKind::Impl` and the constness of a bound in `ast::TraitBoundModifer`. Additionally, constness of trait bounds is now stored in an additional field of `ty::Predicate::Trait`, and the combination of the constness of the item along with any `TraitBoundModifier` determines the constness of the bound in accordance with the RFC. Encoding the constness of impls at the `ty` level is left for a later PR. After a discussion in \#wg-grammar on Discord, it was decided that the grammar should not encode the mutual exclusivity of trait bound modifiers. The grammar for trait bound modifiers remains `[?const] [?]`. To encode this, I add a dummy variant to `ast::TraitBoundModifier` that is used when the syntax `?const ?` appears. This variant causes an error in AST validation and disappears during HIR lowering. cc #67794 r? @oli-obk
2020-01-20Parse `?const ?Trait`Dylan MacKenzie-18/+5
2020-01-20Add `MaybeConst` variant to `{ast,hir}::TraitBoundModifier`Dylan MacKenzie-9/+24
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-1/+0
2020-01-15remove redundant clones, found by clippyMatthias Krüger-1/+1
2020-01-09Parse `?const Trait` bound syntaxDylan MacKenzie-14/+77
The grammar also handles `?const ?Trait` even though this is semantically redundant.
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-2/+1
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-2/+2
2019-12-31parser: bug -> span_bugMazdak Farrokhzad-1/+3
2019-12-23extract parse_not_exprMazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-36/+25
2019-12-22Rollup merge of #67148 - Centril:ty-polish, r=estebankMazdak Farrokhzad-240/+307
Refactor type & bounds parsing thoroughly PR is based on https://github.com/rust-lang/rust/pull/67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`. Also fixes #67146. r? @estebank
2019-12-21span_suggestion_hidden -> tool_only_span_suggestionMazdak Farrokhzad-1/+1
2019-12-21unwrap -> expectMazdak Farrokhzad-1/+1
2019-12-21parse_ty_bare_fn: improve docsMazdak Farrokhzad-13/+8
2019-12-21document parse_late_bound_lifetime_defsMazdak Farrokhzad-0/+1
2019-12-21extract error_negative_boundsMazdak Farrokhzad-27/+35
2019-12-21parse_generic_bounds: account for negative lifetime boundsMazdak Farrokhzad-19/+16
2019-12-21simplify 'let question = ...;'Mazdak Farrokhzad-1/+1
2019-12-21simplify negative bound diagnosticMazdak Farrokhzad-21/+8
2019-12-21extract parse_generic_lt_boundMazdak Farrokhzad-10/+22
2019-12-21extract parse_generic_ty_boundMazdak Farrokhzad-15/+24
2019-12-21parse_generic_bound: leave a FIXMEMazdak Farrokhzad-0/+2
2019-12-21functionalize parse_generic_boundMazdak Farrokhzad-18/+14
2019-12-21extract parse_generic_boundMazdak Farrokhzad-40/+61
2019-12-21extract can_begin_boundMazdak Farrokhzad-13/+12
2019-12-21parse_generic_bounds_common: dedentMazdak Farrokhzad-32/+32
2019-12-21extract recover_paren_lifetimeMazdak Farrokhzad-15/+21
2019-12-21extract error_opt_out_lifetimeMazdak Farrokhzad-4/+8
2019-12-21parser/ty.rs: minor formatting tweaksMazdak Farrokhzad-12/+23