You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubmod foo {include!(concat!(env!("OUT_DIR"), "/foo.rs"));pubmod bar {include!(concat!(env!("OUT_DIR"), "/foo.bar.rs"));}}
Such proto files lead to error:
error[E0428]: the name `bar` is defined multiple times
--> /Users/kriomant/.cargo/target/debug/build/proto-67d1c5fed5b166e2/out/foo.rs:8:1
|
8 | pub mod bar {
| ^^^^^^^^^^^ `bar` redefined here
|
::: src/lib.rs:3:5
|
3 | pub mod bar {
| ----------- previous definition of the module `bar` here
|
= note: `bar` must be defined only once in the type namespace of this module
This is because each message with 'oneof' field generates module with name corresponding to that message name.
In this case it conflicts with existing proto package.
The text was updated successfully, but these errors were encountered:
Here is reduced copy of what I met in .proto files of real service. This service is out of my control, I just want to create client for it.
proto/foo.proto
proto/foo/bar.proto
src/lib.rs
Such proto files lead to error:
This is because each message with 'oneof' field generates module with name corresponding to that message name.
In this case it conflicts with existing proto package.
The text was updated successfully, but these errors were encountered: