Remove TODO that we won't do and leave a comment explaining in its place

PiperOrigin-RevId: 650635842
pull/17382/head
Protobuf Team Bot 7 months ago committed by Copybara-Service
parent e759a39d51
commit 55a5f0c4db
  1. 8
      src/google/protobuf/compiler/rust/oneof.cc

@ -130,9 +130,11 @@ void GenerateOneofDefinition(Context& ctx, const OneofDescriptor& oneof) {
}},
},
// TODO: Revisit if isize is the optimal repr for this enum.
// TODO: not_set currently has phantom data just to avoid the
// lifetime on the enum breaking compilation if there are zero supported
// fields on it (e.g. if the oneof only has Messages inside).
// Note: This enum deliberately has a 'msg lifetime associated with it
// even if all fields were scalars; we could conditionally exclude the
// lifetime under that case, but it would mean changing the .proto file
// to add an additional string or message-typed field to the oneof would
// be a more breaking change than it needs to be.
R"rs(
#[non_exhaustive]
#[derive(Debug, Clone, Copy)]

Loading…
Cancel
Save