E0008#
Warning name: redundant_modifier
修饰符(pub/priv)在这里是多余的,因为这个字段默认具有这样的可见性。
错误示例#
///|
struct A {
priv value : Int
//^^
}
///|
pub struct B {
pub value : Int
//^
}
建议#
移除字段上的可见性修饰符。
///|
struct A {
value : Int
}
///|
pub struct B {
value : Int
}