message: derive `Serialize` for `DebugInfo`
diff: @@ -737,7 +737,8 @@ impl Profile {
  /// cause to build a unit twice. By deferring the choice until we know
  /// whether to choose the optimized value or the default value, we can make sure
  /// the unit is only built once and the unit graph is still optimized.
  -#[derive(Debug, Copy, Clone)]
  +#[derive(Debug, Copy, Clone, serde::Serialize)]
  +#[serde(untagged)]
  pub enum DebugInfo {
  /// No debuginfo level was set.
  None,
  @@ -788,15 +789,6 @@ impl DebugInfo {
  }
  }
  -impl serde::Serialize for DebugInfo {
  - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
  - where
  - S: serde::Serializer,
  - {
  - self.to_option().serialize(serializer)
  - }
  -}
  -
  impl PartialEq for DebugInfo {
  fn eq(&self, other: &DebugInfo) -> bool {
  self.to_option().eq(&other.to_option())
  