diff --git a/prost-build/src/code_generator.rs b/prost-build/src/code_generator.rs index 1ab19ee41..e037d8e47 100644 --- a/prost-build/src/code_generator.rs +++ b/prost-build/src/code_generator.rs @@ -1016,6 +1016,11 @@ impl<'a> CodeGenerator<'a> { } } + /// Returns whether the Rust type for this field needs to be `Box<_>`. + /// + /// This can be explicitly configured with `Config::boxed`, or necessary + /// to prevent an infinitely sized type definition in case when the type of + /// a non-repeated message field transitively contains the message itself. fn boxed( &self, field: &FieldDescriptorProto,