Skip to content

Commit a56eff2

Browse files
committed
Rename some Diagnostic setters.
`Diagnostic` has 40 methods that return `&mut Self` and could be considered setters. Four of them have a `set_` prefix. This doesn't seem necessary for a type that implements the builder pattern. This commit removes the `set_` prefixes on those four methods.
1 parent a2efaf0 commit a56eff2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnabl
119119
fluent::codegen_gcc_target_feature_disable_or_enable
120120
);
121121
if let Some(span) = self.span {
122-
diag.set_span(span);
122+
diag.span(span);
123123
};
124124
if let Some(missing_features) = self.missing_features {
125125
diag.subdiagnostic(missing_features);
126126
}
127-
diag.set_arg("features", self.features.join(", "));
127+
diag.arg("features", self.features.join(", "));
128128
diag
129129
}
130130
}

0 commit comments

Comments
 (0)