summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/ty.rs
AgeCommit message (Collapse)AuthorLines
2021-06-04Remove incorrect assertion in type parsing codeFabian Wolff-1/+0
2021-05-16Implement Anonymous{Struct, Union} in the ASTjedel1043-0/+13
Add unnamed_fields feature gate and gate unnamed fields on parsing
2021-05-03Handle incorrect placement of parentheses in trait bounds more gracefullyEsteban Küber-3/+36
Fix #84772.
2021-03-17Add pub as optional check_front_matterIvan Tham-2/+2
async-pub check created a regression for default
2021-02-27Recover from X<Y,Z> when parsing const exprÖmer Sinan Ağacan-2/+10
This adds recovery when in array type syntax user writes [X; Y<Z, ...>] instead of [X; Y::<Z, ...>] Fixes #82566 Note that whenever we parse an expression and know that the next token cannot be `,`, we should be calling check_mistyped_turbofish_with_multiple_type_params for this recovery. Previously we only did this for statement parsing (e.g. `let x = f<a, b>;`). We now also do it when parsing the length field in array type syntax.
2020-12-17Address review commentsmibac138-7/+21
2020-12-03Gracefully handle confusing -> with : in function return typemibac138-13/+65
2020-12-01Gracefully handle mistyping -> as => in function return typemibac138-0/+21
2020-10-25Tweak invalid `fn` header and body parsingEsteban Küber-1/+13
* Recover empty `fn` bodies when encountering `}` * Recover trailing `>` in return types * Recover from non-type in array type `[<BAD TOKEN>; LEN]`
2020-09-21fix typo in docs and commentsyuk1ty-1/+1
2020-09-15improve diagnostics for lifetime after `&mut`SNCPlay42-1/+27
2020-09-10Attach `TokenStream` to `ast::Ty`Aaron Hill-1/+1
A `Ty` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-08-30mv compiler to compiler/mark-0/+631