summary refs log tree commit diff
path: root/compiler/rustc_ast/src/util/parser.rs
AgeCommit message (Collapse)AuthorLines
2023-10-27Add gen blocks to ast and do some broken ast loweringOli Scherer-2/+2
2023-08-04Improve spans for indexing expressionsNilstrieb-1/+1
Indexing is similar to method calls in having an arbitrary left-hand-side and then something on the right, which is the main part of the expression. Method calls already have a span for that right part, but indexing does not. This means that long method chains that use indexing have really bad spans, especially when the indexing panics and that span in coverted into a panic location. This does the same thing as method calls for the AST and HIR, storing an extra span which is then put into the `fn_span` field in THIR.
2023-06-19Syntatically accept `become` expressionsMaybe Waffle-1/+3
2023-05-01Rip it outNilstrieb-14/+9
My type ascription Oh rip it out Ah If you think we live too much then You can sacrifice diagnostics Don't mix your garbage Into my syntax So many weird hacks keep diagnostics alive Yet I don't even step outside So many bad diagnostics keep tyasc alive Yet tyasc doesn't even bother to survive!
2023-04-27Tweak await spanMichael Goulet-1/+1
2023-04-21offset_ofDrMeepster-1/+3
2023-03-14Remove box expressions from HIRclubby789-3/+1
2023-03-03Match unmatched backticks in comments in compiler/est31-1/+1
2023-01-26Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obkbors-1/+3
Move format_args!() into AST (and expand it during AST lowering) Implements https://github.com/rust-lang/compiler-team/issues/541 This moves FormatArgs from rustc_builtin_macros to rustc_ast_lowering. For now, the end result is the same. But this allows for future changes to do smarter things with format_args!(). It also allows Clippy to directly access the ast::FormatArgs, making things a lot easier. This change turns the format args types into lang items. The builtin macro used to refer to them by their path. After this change, the path is no longer relevant, making it easier to make changes in `core`. This updates clippy to use the new language items, but this doesn't yet make clippy use the ast::FormatArgs structure that's now available. That should be done after this is merged.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2023-01-12Expand format_args!() in rust_ast_lowering.Mara Bos-1/+3
2022-12-01Remove useless borrows and derefsMaybe Waffle-3/+3
2022-11-21Remove `ref` patterns from `rustc_ast`Maybe Waffle-11/+11
Also use if let chains in one case.
2022-11-17Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and ↵Nicholas Nethercote-1/+1
patterns.
2022-09-16more simple formattingRageking8-34/+34
2022-08-10Do not consider method call receiver as an argument in AST.Camille GILLOT-2/+2
2022-04-30Add `do yeet` expressions to allow experimentation in nightlyScott McMurray-1/+3
Using an obviously-placeholder syntax. An RFC would still be needed before this could have any chance at stabilization, and it might be removed at any point. But I'd really like to have it in nightly at least to ensure it works well with try_trait_v2, especially as we refactor the traits.
2021-11-06use matches!() macro in more placesMatthias Krüger-4/+4
2021-10-17Some "parenthesis" and "parentheses" fixesr00ster91-2/+2
2020-10-16Parse inline const expressionsSantiago Pastorino-0/+2
2020-10-14Remove unused code from rustc_astest31-1/+0
2020-08-30mv compiler to compiler/mark-0/+403