Unnamed repository; edit this file 'description' to name the repository.
derivable_impls
Johann Hemmann 2024-02-01
parent 0adb4d1 · commit c468834
-rw-r--r--Cargo.toml1
-rw-r--r--crates/hir-def/src/per_ns.rs8
2 files changed, 1 insertions, 8 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 0d42f9c655..6350027ddb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -168,7 +168,6 @@ new_ret_no_self = "allow"
## Following lints should be tackled at some point
borrowed_box = "allow"
borrow_deref_ref = "allow"
-derivable_impls = "allow"
derived_hash_with_manual_eq = "allow"
field_reassign_with_default = "allow"
forget_non_drop = "allow"
diff --git a/crates/hir-def/src/per_ns.rs b/crates/hir-def/src/per_ns.rs
index 23d41cc0d8..36ab62d0f7 100644
--- a/crates/hir-def/src/per_ns.rs
+++ b/crates/hir-def/src/per_ns.rs
@@ -16,19 +16,13 @@ pub enum Namespace {
Macros,
}
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub struct PerNs {
pub types: Option<(ModuleDefId, Visibility, Option<ImportOrExternCrate>)>,
pub values: Option<(ModuleDefId, Visibility, Option<ImportId>)>,
pub macros: Option<(MacroId, Visibility, Option<ImportId>)>,
}
-impl Default for PerNs {
- fn default() -> Self {
- PerNs { types: None, values: None, macros: None }
- }
-}
-
impl PerNs {
pub fn none() -> PerNs {
PerNs { types: None, values: None, macros: None }