E0049

E0049#

Warning name: missing_definition

未使用的 pub 定义,因为它在 mbti 文件中不存在。

A .mbti file contains the public interface of a package. When a package implements a virtual package, it is checked against the interface of that virtual package, and this warning is emitted if extra public declarations are found.

错误示例#

moon.pkg#
options(
  "virtual": { "has-default": true },
)
pkg.mbti#
package "moonbit-community/E0049"
top.mbt#
///|
pub fn f() -> Unit {

}

建议#

移除未出现在接口中的公共声明。