c2rust
c2rust copied to clipboard
Inner type not imported with `--reorganize-definitions`
I am trying to transpile a kernel module with --reorganize-definitions.
got some errors:
error[E0422]: cannot find struct, variant or union type `flowi4_Inner` in this scope
--> src/media_proxy.rs:8281:28
|
8281 | ... flowi4_Inner{__fl_common:
| ^^^^^^^^^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
8329 | use crate::src::media_proxy::flow_h::flowi4_Inner;
|
more codes:
let mut fl4: flowi4 =
flowi4({
let mut init =
flowi4_Inner{__fl_common:
{
flowi4_Inner is defined here:
#[derive(Copy, Clone)]
#[repr(C, align (8))]
#[c2rust::src_loc = "52:8"]
pub struct flowi4(pub flowi4_Inner);
#[derive(Copy, Clone)]
#[repr(C)]
#[c2rust::src_loc = "52:8"]
pub struct flowi4_Inner {
pub __fl_common: flowi_common,
pub saddr: __be32,
pub daddr: __be32,
pub uli: flowi_uli,
}
c2rust version: 067ae31ad9932ba89a8466cc604ecae4f3a0c422