Skip to content

Commit eeb15a3

Browse files
committed
Rename DiagnosticDeriveVariantBuilder as DiagDeriveVariantBuilder.
1 parent b4b9b1d commit eeb15a3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(crate) enum DiagDeriveKind {
2424
/// Tracks persistent information required for a specific variant when building up individual calls
2525
/// to diagnostic methods for generated diagnostic derives - both `Diagnostic` for
2626
/// fatal/errors/warnings and `LintDiagnostic` for lints.
27-
pub(crate) struct DiagnosticDeriveVariantBuilder {
27+
pub(crate) struct DiagDeriveVariantBuilder {
2828
/// The kind for the entire type.
2929
pub kind: DiagDeriveKind,
3030

@@ -47,7 +47,7 @@ pub(crate) struct DiagnosticDeriveVariantBuilder {
4747
pub code: SpannedOption<()>,
4848
}
4949

50-
impl HasFieldMap for DiagnosticDeriveVariantBuilder {
50+
impl HasFieldMap for DiagDeriveVariantBuilder {
5151
fn get_field_binding(&self, field: &String) -> Option<&TokenStream> {
5252
self.field_map.get(field)
5353
}
@@ -59,7 +59,7 @@ impl DiagDeriveKind {
5959
/// or attributes on the type itself when input is an enum.
6060
pub(crate) fn each_variant<'s, F>(self, structure: &mut Structure<'s>, f: F) -> TokenStream
6161
where
62-
F: for<'v> Fn(DiagnosticDeriveVariantBuilder, &VariantInfo<'v>) -> TokenStream,
62+
F: for<'v> Fn(DiagDeriveVariantBuilder, &VariantInfo<'v>) -> TokenStream,
6363
{
6464
let ast = structure.ast();
6565
let span = ast.span().unwrap();
@@ -88,7 +88,7 @@ impl DiagDeriveKind {
8888
// name will need to do.
8989
_ => variant.ast().ident.span().unwrap(),
9090
};
91-
let builder = DiagnosticDeriveVariantBuilder {
91+
let builder = DiagDeriveVariantBuilder {
9292
kind: self,
9393
span,
9494
field_map: build_field_mapping(variant),
@@ -107,7 +107,7 @@ impl DiagDeriveKind {
107107
}
108108
}
109109

110-
impl DiagnosticDeriveVariantBuilder {
110+
impl DiagDeriveVariantBuilder {
111111
/// Generates calls to `code` and similar functions based on the attributes on the type or
112112
/// variant.
113113
pub(crate) fn preamble(&mut self, variant: &VariantInfo<'_>) -> TokenStream {
@@ -165,7 +165,7 @@ impl DiagnosticDeriveVariantBuilder {
165165
Ok(Some((subdiag.kind, slug, subdiag.no_span)))
166166
}
167167

168-
/// Establishes state in the `DiagnosticDeriveBuilder` resulting from the struct
168+
/// Establishes state in the `DiagDeriveVariantBuilder` resulting from the struct
169169
/// attributes like `#[diag(..)]`, such as the slug and error code. Generates
170170
/// diagnostic builder calls for setting error code and creating note/help messages.
171171
fn generate_structure_code_for_attr(

0 commit comments

Comments
 (0)