diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 09:08:41 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-03 19:40:20 +1100 |
| commit | a56eff2b4152a9846027f03c6bab35a653f958c4 (patch) | |
| tree | f53f1c8bd34f0f882d1753d06c28274bf969da0e | |
| parent | a2efaf003026bd10a0c90cdbe10175ca90faf3ae (diff) | |
| download | rust-a56eff2b4152a9846027f03c6bab35a653f958c4.tar.gz rust-a56eff2b4152a9846027f03c6bab35a653f958c4.zip | |
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.
| -rw-r--r-- | src/errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/errors.rs b/src/errors.rs index 1b1ed0b411c..e9283b19894 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -119,12 +119,12 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnabl fluent::codegen_gcc_target_feature_disable_or_enable ); if let Some(span) = self.span { - diag.set_span(span); + diag.span(span); }; if let Some(missing_features) = self.missing_features { diag.subdiagnostic(missing_features); } - diag.set_arg("features", self.features.join(", ")); + diag.arg("features", self.features.join(", ")); diag } } |
