本页尚未翻译,以下为英文原文。
#E0033: invalid re-export
A pub use breaks a rule: it is wider than the item it re-exports, it re-exports a macro, or re-exports form a cycle. Make the item as visible as the re-export, or change the re-export.
nabi
pub use inner::helper;
mod inner {
fn helper() -> i32 { 1 }
}
error[E0033]: `inner::helper` is private but re-exported as `pub` - a re-export can't be wider than its item --> main.nabi:1:9 | 1 | pub use inner::helper; | ^^^^^
Make the item as visible as the re-export:
nabi
pub use inner::helper;
mod inner {
pub fn helper() -> i32 { 1 }
}
println(f"{helper()}");
1
Found a mistake? Edit this page on GitHub. Last updated