From d87c16bea60f4972b0adf4dd69bbb9abcfca12d6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 21:00:50 +0300 Subject: hir_def is fully doc'ed! --- crates/ra_hir_def/src/body/scope.rs | 2 +- crates/ra_hir_def/src/per_ns.rs | 5 ++++- crates/ra_hir_def/src/resolver.rs | 6 +++--- xtask/tests/tidy-tests/docs.rs | 1 - 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index 5240a59d5..625aa39dd 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs @@ -1,4 +1,4 @@ -//! FIXME: write short doc here +//! Name resolution for expressions. use std::sync::Arc; use hir_expand::name::Name; diff --git a/crates/ra_hir_def/src/per_ns.rs b/crates/ra_hir_def/src/per_ns.rs index 06ef6c9fc..00e866bf9 100644 --- a/crates/ra_hir_def/src/per_ns.rs +++ b/crates/ra_hir_def/src/per_ns.rs @@ -1,4 +1,7 @@ -//! FIXME: write short doc here +//! In rust, it is possible to have a value, a type and a macro with the same +//! name without conflicts. +//! +//! `PerNs` (per namespace) captures this. use hir_expand::MacroDefId; diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs index c24a9b165..1f8887c6b 100644 --- a/crates/ra_hir_def/src/resolver.rs +++ b/crates/ra_hir_def/src/resolver.rs @@ -29,20 +29,20 @@ pub struct Resolver { // FIXME how to store these best #[derive(Debug, Clone)] -pub(crate) struct ModuleItemMap { +struct ModuleItemMap { crate_def_map: Arc, module_id: LocalModuleId, } #[derive(Debug, Clone)] -pub(crate) struct ExprScope { +struct ExprScope { owner: DefWithBodyId, expr_scopes: Arc, scope_id: ScopeId, } #[derive(Debug, Clone)] -pub(crate) enum Scope { +enum Scope { /// All the items and imported names of a module ModuleScope(ModuleItemMap), /// Brings the generic parameters of an item into scope diff --git a/xtask/tests/tidy-tests/docs.rs b/xtask/tests/tidy-tests/docs.rs index 141219860..fae871285 100644 --- a/xtask/tests/tidy-tests/docs.rs +++ b/xtask/tests/tidy-tests/docs.rs @@ -74,7 +74,6 @@ fn no_docs_comments() { "ra_db", "ra_hir", "ra_hir_expand", - "ra_hir_def", "ra_ide_api", "ra_lsp_server", "ra_mbe", -- cgit v1.2.3