about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
AgeCommit message (Collapse)AuthorLines
2021-06-05Fix handling of unmatched angle brackets in parserFabian Wolff-37/+47
2021-02-27Fix turbofish recovery with multiple generic argsÖmer Sinan Ağacan-1/+1
check_mistyped_turbofish_with_multiple_type_params was previously expecting type arguments between angle brackets, which is not right, as we can also see const expressions. We now use generic argument parser instead of type parser. Test with one, two, and three generic arguments added to check consistentcy between 1. check_no_chained_comparison: Called after parsing a nested binop application like `x < A > ...` where angle brackets are interpreted as binary operators and `A` is an expression. 2. check_mistyped_turbofish_with_multiple_type_params: called by `parse_full_stmt` when we expect to see a semicolon after parsing an expression but don't see it. (In `T2<1, 2>::C;`, the expression is `T2 < 1`)
2021-01-26Point only at generic arguments when they are unexpectedEsteban Küber-1/+9
2021-01-22improve diagnostics for angle argsb-naber-44/+11
2021-01-10Rework diagnostics for wrong number of generic argsPatryk Wychowaniec-1/+2
2021-01-01first pass at default values for const genericsJulian Knodt-11/+18
- Adds optional default values to const generic parameters in the AST and HIR - Parses these optional default values - Adds a `const_generics_defaults` feature gate
2020-12-24use matches!() macro in more placesMatthias Krüger-4/+3
2020-12-03Gracefully handle confusing -> with : in function return typemibac138-2/+2
2020-12-01Gracefully handle mistyping -> as => in function return typemibac138-2/+3
2020-11-27Auto merge of #79266 - b-naber:gat_trait_path_parser, r=petrochenkovbors-26/+83
Generic Associated Types in Trait Paths - Ast part The Ast part of https://github.com/rust-lang/rust/pull/78978 r? `@petrochenkov`
2020-11-25ast and parserb-naber-26/+83
2020-11-18Permit standalone generic parameters as const generic arguments in macrosvarkor-0/+8
2020-10-30Fix even more clippy warningsJoshua Nelson-6/+8
2020-10-26Suggest expressions that look like const generic arguments should be ↵varkor-17/+33
enclosed in brackets Co-Authored-By: Esteban Kuber <github@kuber.com.ar>
2020-09-10Attach `TokenStream` to `ast::Path`Aaron Hill-3/+6
2020-08-30mv compiler to compiler/mark-0/+516