about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
AgeCommit message (Collapse)AuthorLines
2023-08-16Fix bad suggestion when wrong parentheses around a dyn traityukang-8/+11
2023-08-04Rollup merge of #113999 - Centri3:macro-arm-expand, r=wesleywiserMatthias Krüger-0/+6
Specify macro is invalid in certain contexts Adds a note when a macro is used where it really shouldn't be. Closes #113766
2023-08-03Rollup merge of #114300 - MU001999:fix/turbofish-pat, r=estebankMatthias Krüger-0/+14
Suggests turbofish in patterns Fixes #114112 r? ```@estebank```
2023-08-01Suggests turbofish in patternsMu001999-0/+14
2023-07-31parser: more friendly hints for handling `async move` in the 2015 editionbohan-0/+7
2023-07-29Auto merge of #114028 - Centri3:ternary-operator, r=compiler-errorsbors-0/+8
Gracefully handle ternary operator Fixes #112578 ~~May not be the best way to do this as it doesn't check for a single `:`, so it could perhaps appear even when the actual issue is just a missing semicolon. May not be the biggest deal, though?~~ Nevermind, got it working properly now ^^
2023-07-28Parse generic const itemsLeón Orell Valerian Liehr-0/+31
2023-07-25Gracefully handle missing ternary operatorCatherine Flores-0/+8
2023-07-24Specify macro is invalid in certain contextsCatherine-0/+6
2023-06-23Add suggestion for bad block fragment errorMichael Goulet-0/+11
2023-05-13improve error for `impl<..> impl Trait for Type`y21-0/+10
2023-05-09Rollup merge of #111120 - chenyukang:yukang-suggest-let, r=NilstriebDylan DPC-0/+12
Suggest let for possible binding with ty Origin from https://github.com/rust-lang/rust/pull/109128#discussion_r1179866137 r? `@Nilstrieb`
2023-05-09move sugg to derive session diagnosticyukang-0/+12
2023-05-05Add parsing for builtin # in expression and item contextest31-0/+15
2023-05-02Implement negative boundsMichael Goulet-27/+4
2023-05-01Rip it outNilstrieb-0/+22
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-27Migrate trivially translatable `rustc_parse` diagnosticsclubby789-0/+224
2023-04-25Fix static string lintsclubby789-0/+89
2023-04-10Remove `..` from return type notationMichael Goulet-0/+8
2023-03-28Add `(..)` syntax for RTNMichael Goulet-0/+8
2023-03-19refactor: improve "ident starts with number" errorEzra Shaw-1/+4
2023-03-19refactor: refactor identifier parsing somewhatEzra Shaw-3/+3
2023-03-12Remove `box_syntax` from AST and use in toolsclubby789-0/+13
2023-03-09feat/refactor: improve errors in case of ident with number at startEzra Shaw-8/+9
2023-03-01recover from for-else and while-elsey21-0/+11
2023-02-22errors: generate typed identifiers in each crateDavid Wood-84/+104
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-09Rollup merge of #107446 - clubby789:rustc-parse-diag-migrate, r=compiler-errorsMatthias Krüger-0/+312
Migrate some of `rustc_parse` to derive diagnostics `@rustbot` label +A-translation r? rust-lang/diagnostics cc #100717
2023-02-06Migrate `rustc_parse` to derive diagnosticsclubby789-0/+312
2023-02-06Rollup merge of #107580 - ↵Dylan DPC-0/+8
lenko-d:default_value_for_a_lifetime_generic_parameter_produces_confusing_diagnostic, r=compiler-errors Recover from lifetimes with default lifetimes in generic args Fixes [#107492](https://github.com/rust-lang/rust/issues/107492)
2023-02-05Recover from missing expression in for loopObei Sideg-0/+12
2023-02-04Recover from default value for a lifetime in generic parameters.Lenko Donchev-0/+8
2023-02-02Rollup merge of #107493 - clubby789:range-fat-arrow-followup, r=estebankMatthias Krüger-6/+3
Improve diagnostic for missing space in range pattern Improves the diagnostic in #107425 by turning it into a note explaining the parsing issue. r? `@compiler-errors`
2023-02-02Improve diagnostic for missing space in range patternclubby789-6/+3
2023-02-02Recover _ as .. in field patternMichael Goulet-1/+4
2023-02-01Make "use latest edition" subdiagnostic translatableXiretza-3/+23
2023-02-01rustc_parse: revert conversion of "non-item in item list" diagnosticXiretza-32/+0
#[derive(Subdiagnostic)] does not allow multiple subdiagnostics on one variant, as in NonItemInItemListSub::Other.
2023-02-01migrate parser::ty to diagnostic structsXiretza-0/+103
2023-02-01rustc_parse: migrate more to diagnostic structsXiretza-2/+517
2023-01-30Make the "extra if in let...else block" hint a suggestionEdward Shen-1/+1
2023-01-28Migrate some range parsing diagnosticsclubby789-0/+42
2023-01-23Add suggestion to remove if in let...else blockEdward Shen-1/+10
Adds an additional hint to failures where we encounter an else keyword while we're parsing an if-let block. This is likely that the user has accidentally mixed if-let and let...else together.
2023-01-12Auto merge of #106537 - ↵bors-0/+24
fmease:recover-where-clause-before-tuple-struct-body, r=estebank Recover from where clauses placed before tuple struct bodies Open to any suggestions regarding the phrasing of the diagnostic. Fixes #100790. `@rustbot` label A-diagnostics r? diagnostics
2023-01-11parser: recover from where clauses placed before tuple struct bodiesLeón Orell Valerian Liehr-0/+24
2023-01-11Detect struct literal needing parenthesesEsteban Küber-0/+18
Fix #82051.
2022-12-27Recover `fn` keyword as `Fn` trait in boundsMichael Goulet-0/+8
2022-12-10fix #105366, suggest impl in the scenario of typo with fnyukang-0/+8
2022-11-21Match crate and slug namesmejrs-120/+114
2022-11-18Rollup merge of #103405 - chenyukang:yukang/fix-103381-and-if, r=compiler-errorsMatthias Krüger-0/+8
Detect incorrect chaining of if and if let conditions and recover Fixes #103381
2022-11-16Use `token::Lit` in `ast::ExprKind::Lit`.Nicholas Nethercote-90/+0
Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. This commit changes the language very slightly. Some programs that used to not compile now will compile. This is because some invalid literals that are removed by `cfg` or attribute macros will no longer trigger errors. See this comment for more details: https://github.com/rust-lang/rust/pull/102944#issuecomment-1277476773
2022-11-15fix #104088, Slightly improve error message for invalid identifieryukang-0/+8