Open ldm0 opened 2 months ago
The output of cargo expand
reveals the issue:
Type of owned_value
was inferred as String
(because of the function signature of prost::encoding::string::merge
), while it should be Box<String>
actually.
So a boxed oneof
field produces invalid code.
The tests for boxed
are clearly lacking. Upstream protobuf defines a TestAllTypesProto2
type. We already use that for roundtrip tests. I feel like we should do a fully boxed version of that as well.
Version
prost@0.13.2
,prost-build@0.13.2
Description
prost_config::Config::boxed
generates code doesn't compile. I tried this code:boxed_tests.proto
:build.rs
:main.rs
I expected to see this happen: compiled successfully
Instead, this happened: compilation failed. error message: