Skip to content

Commit 1830b38

Browse files
committed
Handle path types that start with crate::
1 parent 7059159 commit 1830b38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

c-bindings-gen/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,8 @@ impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr
650650
Some(format!("{}::{}{}", self.module_path, first_seg.ident, remaining))
651651
} else if first_seg_is_stdlib(&first_seg_str) || self.dependencies.contains(&first_seg.ident) {
652652
Some(first_seg_str + &remaining)
653+
} else if first_seg_str == "crate" {
654+
Some(self.crate_name.to_owned() + &remaining)
653655
} else { None }
654656
}
655657
}

0 commit comments

Comments
 (0)