docs

您正在閱讀 v0.1.2 的文件。Nabi 0.1.2 已停止支援。 最新版本:v0.1.3 →

本頁尚未翻譯,以下為英文原文。

#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

Related: E0034 item is private, E0030 unresolved import

Found a mistake? Edit this page on GitHub. Last updated