Beschreibung
When trying to generate two files that contain the same module name, a name redefinition error occurs.
Reproduktion
//robot.idl
#pragma once
module common {
module util {
struct Robot {
uint32 id;
uint32 label;
};
};
};
//util.idl
#pragma once
module common {
module util {
struct Position {
uint32 x;
uint32 y;
};
};
};
//build.rs
fn main() {
zerodds_build::Config::new().out_dir("./src/generated")
.flatten_shared_includes(true)
.compile(&["./idl/Robot.idl", "./idl/util.idl"]).unwrap();
}
error[E0428]: the name `common` is defined multiple times
--> subscribe\src\generated/util.rs:4:1
|
4 | pub mod common {
| ^^^^^^^^^^^^^^ `common` redefined here
|
::: subscribe\src\generated/Robot.rs:4:1
|
4 | pub mod common {
| -------------- previous definition of the module `common` here
|
= note: `common` must be defined only once in the type namespace of this module
Environment
- ZeroDDS-Crate : main
- Rust-Version: rustc 1.96.0 (ac68faa20 2026-05-25)
- OS / Architektur: W11
Beschreibung
When trying to generate two files that contain the same module name, a name redefinition error occurs.
Reproduktion
Environment