about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/lexer/diagnostics.rs
AgeCommit message (Collapse)AuthorLines
2025-07-18Deduplicate `unmatched_delims` in `rustc_parse` to reduce confusionxizheyin-7/+13
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-22Rename `open_brace` to `open_delimiters`xizheyin-2/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-22Move make_unclosed_delims_error to lexer/diagonostics.rsxizheyin-0/+24
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2024-10-23"innermost", "outermost", "leftmost", and "rightmost" don't need hyphensJosh Triplett-1/+1
These are all standard dictionary words and don't require hyphenation.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-07narrow down visibilities in `rustc_parse::lexer`Lin Yihai-4/+4
2024-02-28Rename `DiagnosticBuilder` as `Diag`.Nicholas Nethercote-6/+3
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
2024-02-19Prefer `DiagnosticBuilder` over `Diagnostic` in diagnostic modifiers.Nicholas Nethercote-3/+3
There are lots of functions that modify a diagnostic. This can be via a `&mut Diagnostic` or a `&mut DiagnosticBuilder`, because the latter type wraps the former and impls `DerefMut`. This commit converts all the `&mut Diagnostic` occurrences to `&mut DiagnosticBuilder`. This is a step towards greatly simplifying `Diagnostic`. Some of the relevant function are made generic, because they deal with both errors and warnings. No function bodies are changed, because all the modifier methods are available on both `Diagnostic` and `DiagnosticBuilder`.
2023-10-13Format all the let chains in compilerMichael Goulet-3/+4
2023-07-30inline format!() args up to and including rustc_middleMatthias Krüger-1/+1
2023-04-10Fix typos in compilerDaniPopes-3/+3
2023-03-07Simplify `sort_by` callsMaybe Waffle-1/+1
2023-02-28rename unmatched_braces to unmatched_delimsyukang-5/+5
2023-01-27Improve unexpected close and mismatch delimiter hint in TokenTreesReaderyukang-0/+119