Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--Cargo.toml1
-rw-r--r--crates/hir-def/src/nameres/collector.rs4
2 files changed, 2 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4086b12454..f723e08b17 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -179,7 +179,6 @@ needless_doctest_main = "allow"
new_without_default = "allow"
non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow"
-option_map_unit_fn = "allow"
partialeq_to_none = "allow"
ptr_arg = "allow"
redundant_closure = "allow"
diff --git a/crates/hir-def/src/nameres/collector.rs b/crates/hir-def/src/nameres/collector.rs
index 2d32373371..1c0f4d4d35 100644
--- a/crates/hir-def/src/nameres/collector.rs
+++ b/crates/hir-def/src/nameres/collector.rs
@@ -2371,9 +2371,9 @@ impl ModCollector<'_, '_> {
};
for (name, macs) in source.scope.legacy_macros() {
- macs.last().map(|&mac| {
+ if let Some(&mac) = macs.last() {
target.scope.define_legacy_macro(name.clone(), mac);
- });
+ }
}
}