diff --git a/rust/test/shared/accessors_test.rs b/rust/test/shared/accessors_test.rs index 493ce86ca3..ce70a5c5b1 100644 --- a/rust/test/shared/accessors_test.rs +++ b/rust/test/shared/accessors_test.rs @@ -707,8 +707,7 @@ fn test_message_opt_set() { assert_that!(msg.optional_nested_message_opt().is_set(), eq(true)); msg.optional_nested_message_mut().clear(); - // TODO: b/323222163 - // assert_that!(msg.optional_nested_message_mut().is_set(), eq(false)); + assert_that!(msg.optional_nested_message_mut().is_set(), eq(false)); } #[test] @@ -724,8 +723,7 @@ fn test_setting_submsg() { assert_that!(msg.optional_nested_message_mut().is_set(), eq(true)); msg.optional_nested_message_mut().clear(); - // TODO: b/323222163 - // assert_that!(msg.optional_nested_message_mut().is_set(), eq(false)); + assert_that!(msg.optional_nested_message_mut().is_set(), eq(false)); } #[test] @@ -738,8 +736,7 @@ fn test_msg_or_default() { assert_that!(msg.optional_nested_message_mut().is_set(), eq(true)); msg.optional_nested_message_mut().clear(); - // TODO: b/323222163 - //assert_that!(msg.optional_nested_message_mut().is_set(), eq(false)); + assert_that!(msg.optional_nested_message_mut().is_set(), eq(false)); } #[test] diff --git a/src/google/protobuf/compiler/rust/message.cc b/src/google/protobuf/compiler/rust/message.cc index 01015965bb..4ad72ca1c4 100644 --- a/src/google/protobuf/compiler/rust/message.cc +++ b/src/google/protobuf/compiler/rust/message.cc @@ -637,8 +637,7 @@ void GenerateRs(Context& ctx, const Descriptor& msg) { -> Self::AbsentMutData<'_> { // SAFETY: The raw ptr msg_ref is valid unsafe { - (present_mutator.optional_vtable().clearer); - (present_mutator.msg_ref().msg()); + (present_mutator.optional_vtable().clearer)(present_mutator.msg_ref().msg()); $pbi$::RawVTableOptionalMutatorData::new($pbi$::Private, present_mutator.msg_ref(),