| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2022-11-17 | Use `ThinVec` in `ast::Path`. | Nicholas Nethercote | -4/+5 | |
| 2022-11-17 | Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and ↵ | Nicholas Nethercote | -2/+2 | |
| patterns. | ||||
| 2022-11-11 | Introduce `ExprKind::IncludedBytes` | clubby789 | -1/+3 | |
| 2022-09-01 | Always import all tracing macros for the entire crate instead of piecemeal ↵ | Oli Scherer | -1/+0 | |
| by module | ||||
| 2022-08-16 | Avoid unnecessary cloning in `Parser::get_ident_from_generic_arg`. | Nicholas Nethercote | -9/+5 | |
| 2022-08-15 | Simplify attribute handling in `parse_bottom_expr`. | Nicholas Nethercote | -6/+1 | |
| `Parser::parse_bottom_expr` currently constructs an empty `attrs` and then passes it to a large number of other functions. This makes the code harder to read than it should be, because it's not clear that many `attrs` arguments are always empty. This commit removes `attrs` and the passing, simplifying a lot of functions. The commit also renames `Parser::mk_expr` (which takes an `attrs` argument) as `mk_expr_with_attrs`, and introduces a new `mk_expr` which creates an expression with no attributes, which is the more common case. | ||||
| 2022-06-14 | Rollup merge of #95211 - terrarier2111:improve-parser, r=compiler-errors | Yuki Okushi | -4/+16 | |
| Improve parser diagnostics This pr fixes https://github.com/rust-lang/rust/issues/93867 and contains a couple of diagnostics related changes to the parser. Here is a short list with some of the changes: - don't suggest the same thing that is the current token - suggest removing the current token if the following token is one of the suggestions (maybe incorrect) - tell the user to put a type or lifetime after where if there is none (as a warning) - reduce the amount of tokens suggested (via the new eat_noexpect and check_noexpect methods) If any of these changes are undesirable, i can remove them, thanks! | ||||
| 2022-06-13 | remove unnecessary `to_string` and `String::new` | Takayuki Maeda | -6/+6 | |
| 2022-06-12 | Improves parser diagnostics, fixes #93867 | threadexception | -4/+16 | |
| 2022-04-28 | rustc_ast: Harmonize delimiter naming with `proc_macro::Delimiter` | Vadim Petrochenkov | -5/+6 | |
| 2022-04-10 | better error for binder on associated type bound | Michael Goulet | -12/+36 | |
| 2022-04-07 | Shrink `Nonterminal`. | Nicholas Nethercote | -1/+1 | |
| By heap allocating the argument within `NtPath`, `NtVis`, and `NtStmt`. This slightly reduces cumulative and peak allocation amounts, most notably on `deep-vector`. | ||||
| 2022-03-27 | Handle `,` to `;` substitution in arg params | Esteban Kuber | -0/+17 | |
| 2022-03-27 | Provide suggestion for missing `>` in a type parameter list | Esteban Kuber | -1/+17 | |
| When encountering an inproperly terminated type parameter list, provide a suggestion to close it after the last non-constraint type parameter that was successfully parsed. Fix #94058. | ||||
| 2022-03-22 | cancel a not emitted error after parsing const generic args | Takayuki Maeda | -4/+8 | |
| 2022-03-10 | replace `self.clone()` with `self.create_snapshot_for_diagnostic()` | Takayuki Maeda | -2/+2 | |
| 2022-03-10 | add doc comments | Takayuki Maeda | -2/+2 | |
| 2022-03-09 | implement `SnapshotParser` struct | Takayuki Maeda | -3/+3 | |
| 2022-03-09 | take over unclosed_delims | Takayuki Maeda | -0/+1 | |
| 2022-03-09 | remove an unnecessary comment | Takayuki Maeda | -1/+0 | |
| 2022-03-09 | implement and use `diagnostic_snapshot` | Takayuki Maeda | -2/+1 | |
| 2022-03-09 | initialize unclosed_delims field | Takayuki Maeda | -0/+1 | |
| 2022-03-08 | suggest adding `{ .. }` around a const function with arguments | Takayuki Maeda | -0/+9 | |
| 2022-02-28 | 4 - Make more use of `let_chains` | Caio | -7/+7 | |
| Continuation of #94376. cc #53667 | ||||
| 2022-02-25 | Suggest {} around more bad const generic exprs | Michael Goulet | -2/+17 | |
| 2022-02-23 | rustc_errors: take `self` by value in `DiagnosticBuilder::cancel`. | Eduard-Mihai Burtescu | -1/+1 | |
| 2022-01-18 | Rollup merge of #91150 - dtolnay:qpath, r=davidtwco | Matthias Krüger | -10/+34 | |
| Let qpath contain NtTy: `<$:ty as $:ty>::…` Example: ```rust macro_rules! m { (<$type:ty as $trait:ty>::$name:ident) => { <$type as $trait>::$name }; } fn main() { let _: m!(<str as ToOwned>::Owned); } ``` Previous behavior: ```console error: expected identifier, found `ToOwned` --> src/main.rs:3:19 | 3 | <$type as $trait>::$name | ^^^^^^ expected identifier ... 8 | let _: m!(<str as ToOwned>::Owned); | --------------------------- | | | this macro call doesn't expand to a type | in this macro invocation ``` The <code>expected identifier, found \`ToOwned\`</code> error is particularly silly. I think it should be fine to accept this code as long as $trait is of the form `TyKind::Path(None, path)`; if it is any other kind of `NtTy`, we'll keep the same behavior as before. | ||||
| 2022-01-17 | Add term to ExistentialProjection | kadmin | -1/+4 | |
| Also prevent ICE when adding a const in associated const equality. | ||||
| 2022-01-17 | Use Term in ProjectionPredicate | kadmin | -7/+5 | |
| ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time. | ||||
| 2022-01-17 | Add term | kadmin | -2/+4 | |
| Instead of having a separate enum variant for types and consts have one but have either a const or type. | ||||
| 2022-01-17 | add eq constraints on associated constants | kadmin | -20/+17 | |
| 2021-11-25 | Reject generic arguments on mod style interpolated path | David Tolnay | -10/+24 | |
| 2021-11-25 | Let qpath contain NtTy: <$:ty as $:ty>::rest | David Tolnay | -0/+10 | |
| 2021-11-24 | Account for incorrect `impl Foo<const N: ty> {}` syntax | Esteban Küber | -39/+49 | |
| Fix #84946 | ||||
| 2021-09-28 | Improve error messages for bad type constraints | Michael Howell | -11/+20 | |
| Co-authored-by: Esteban Kuber <esteban@kuber.com.ar> | ||||
| 2021-09-16 | feat(rustc_parse): recover from pre-RFC-2000 const generics syntax | Michael Howell | -1/+19 | |
| Fixes #89013 | ||||
| 2021-06-05 | Fix handling of unmatched angle brackets in parser | Fabian Wolff | -37/+47 | |
| 2021-02-27 | Fix 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-26 | Point only at generic arguments when they are unexpected | Esteban Küber | -1/+9 | |
| 2021-01-22 | improve diagnostics for angle args | b-naber | -44/+11 | |
| 2021-01-10 | Rework diagnostics for wrong number of generic args | Patryk Wychowaniec | -1/+2 | |
| 2021-01-01 | first pass at default values for const generics | Julian 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-24 | use matches!() macro in more places | Matthias Krüger | -4/+3 | |
| 2020-12-03 | Gracefully handle confusing -> with : in function return type | mibac138 | -2/+2 | |
| 2020-12-01 | Gracefully handle mistyping -> as => in function return type | mibac138 | -2/+3 | |
| 2020-11-27 | Auto merge of #79266 - b-naber:gat_trait_path_parser, r=petrochenkov | bors | -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-25 | ast and parser | b-naber | -26/+83 | |
| 2020-11-18 | Permit standalone generic parameters as const generic arguments in macros | varkor | -0/+8 | |
| 2020-10-30 | Fix even more clippy warnings | Joshua Nelson | -6/+8 | |
| 2020-10-26 | Suggest expressions that look like const generic arguments should be ↵ | varkor | -17/+33 | |
| enclosed in brackets Co-Authored-By: Esteban Kuber <github@kuber.com.ar> | ||||
