diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-23 10:20:45 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-28 08:55:35 +1100 |
| commit | 899cb40809a85eb9d89f6da3268713b83175360a (patch) | |
| tree | e4c9a526f3eeb5d8563bfe254f1507648fddede2 /compiler/rustc_parse/src/lexer/diagnostics.rs | |
| parent | 4e1f9bd528aef7215bb3b446fcdf43368371da37 (diff) | |
| download | rust-899cb40809a85eb9d89f6da3268713b83175360a.tar.gz rust-899cb40809a85eb9d89f6da3268713b83175360a.zip | |
Rename `DiagnosticBuilder` as `Diag`.
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
Diffstat (limited to 'compiler/rustc_parse/src/lexer/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_parse/src/lexer/diagnostics.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/lexer/diagnostics.rs b/compiler/rustc_parse/src/lexer/diagnostics.rs index 52a029b20f6..993ff1b97f5 100644 --- a/compiler/rustc_parse/src/lexer/diagnostics.rs +++ b/compiler/rustc_parse/src/lexer/diagnostics.rs @@ -1,6 +1,6 @@ use super::UnmatchedDelim; use rustc_ast::token::Delimiter; -use rustc_errors::DiagnosticBuilder; +use rustc_errors::Diag; use rustc_span::source_map::SourceMap; use rustc_span::Span; @@ -30,10 +30,7 @@ pub fn same_indentation_level(sm: &SourceMap, open_sp: Span, close_sp: Span) -> // When we get a `)` or `]` for `{`, we should emit help message here // it's more friendly compared to report `unmatched error` in later phase -pub fn report_missing_open_delim( - err: &mut DiagnosticBuilder<'_>, - unmatched_delims: &[UnmatchedDelim], -) -> bool { +pub fn report_missing_open_delim(err: &mut Diag<'_>, unmatched_delims: &[UnmatchedDelim]) -> bool { let mut reported_missing_open = false; for unmatch_brace in unmatched_delims.iter() { if let Some(delim) = unmatch_brace.found_delim @@ -55,7 +52,7 @@ pub fn report_missing_open_delim( } pub fn report_suspicious_mismatch_block( - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, diag_info: &TokenTreeDiagInfo, sm: &SourceMap, delim: Delimiter, |
