]> git.lizzy.rs Git - rust.git/commitdiff
Oops, inverted condition, fix that
authorLoïc BRANSTETT <loic.branstett@epitech.eu>
Thu, 14 Oct 2021 08:50:46 +0000 (10:50 +0200)
committerLoïc BRANSTETT <loic.branstett@epitech.eu>
Thu, 14 Oct 2021 08:50:46 +0000 (10:50 +0200)
src/librustdoc/visit_ast.rs

index 3e38ac822f50ad74449c744409cc41169b39f496..f60d4e1f29537c7cab5ad468ac2d6ff26b76b528 100644 (file)
@@ -97,7 +97,7 @@ fn store_path(&mut self, did: DefId) {
             if let Res::Def(DefKind::Macro(_), def_id) = export.res {
                 if let Some(local_def_id) = def_id.as_local() {
                     if self.cx.tcx.has_attr(def_id, sym::macro_export) {
-                        if !inserted.insert(def_id) {
+                        if inserted.insert(def_id) {
                             let hir_id = self.cx.tcx.hir().local_def_id_to_hir_id(local_def_id);
                             let item = self.cx.tcx.hir().expect_item(hir_id);
                             top_level_module.items.push((item, None));