about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/ty.rs
AgeCommit message (Collapse)AuthorLines
2021-09-09Revert "Implement Anonymous{Struct, Union} in the AST"Felix S. Klock II-13/+0
This reverts commit 059b68dd677808e14e560802d235ad40beeba71e. Note that this was manually adjusted to retain some of the refactoring introduced by commit 059b68dd677808e14e560802d235ad40beeba71e, so that it could likewise retain the correction introduced in commit 5b4bc05fa57be19bb5962f4b7c0f165e194e3151
2021-08-27Introduce `~const`Deadbeef-26/+20
- [x] Removed `?const` and change uses of `?const` - [x] Added `~const` to the AST. It is gated behind const_trait_impl. - [x] Validate `~const` in ast_validation. - [ ] Add enum `BoundConstness` to the HIR. (With variants `NotConst` and `ConstIfConst` allowing future extensions) - [ ] Adjust trait selection and pre-existing code to use `BoundConstness`. - [ ] Optional steps (*for this PR, obviously*) - [ ] Fix #88155 - [ ] Do something with constness bounds in chalk
2021-07-02Recover from `&dyn mut ...` parse errorsFabian Wolff-1/+21
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