mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
invert if
This commit is contained in:
@@ -159,10 +159,10 @@ pub(crate) fn from_def(def: ModuleDefId, v: Visibility, has_constructor: bool) -
|
||||
AdtId::UnionId(_) => PerNs::types(def, v),
|
||||
AdtId::EnumId(_) => PerNs::types(def, v),
|
||||
AdtId::StructId(_) => {
|
||||
if !has_constructor {
|
||||
PerNs::types(def, v)
|
||||
} else {
|
||||
if has_constructor {
|
||||
PerNs::both(def, def, v)
|
||||
} else {
|
||||
PerNs::types(def, v)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user