Skip to content

Commit fbe9804

Browse files
committed
More cleanups / module docs
1 parent 8a2c482 commit fbe9804

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

crates/hir_ty/src/db.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//! FIXME: write short doc here
1+
//! The home of `HirDatabase`, which is the Salsa database containing all the
2+
//! type inference-related queries.
23
34
use std::sync::Arc;
45

crates/hir_ty/src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! FIXME: write short doc here
1+
//! Type inference-based diagnostics.
22
mod expr;
33
mod match_check;
44
mod unsafe_check;

crates/hir_ty/src/display.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! FIXME: write short doc here
1+
//! The `HirDisplay` trait, which serves two purposes: Turning various bits from
2+
//! HIR back into source code, and just displaying them for debugging/testing
3+
//! purposes.
24
35
use std::{
46
array,

crates/hir_ty/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ pub fn param_idx(db: &dyn HirDatabase, id: TypeParamId) -> Option<usize> {
126126
generics(db.upcast(), id.parent).param_idx(id)
127127
}
128128

129-
pub fn wrap_empty_binders<T>(value: T) -> Binders<T>
129+
pub(crate) fn wrap_empty_binders<T>(value: T) -> Binders<T>
130130
where
131131
T: Fold<Interner, Result = T> + HasInterner<Interner = Interner>,
132132
{
133133
Binders::empty(&Interner, value.shifted_in_from(&Interner, DebruijnIndex::ONE))
134134
}
135135

136-
pub fn make_only_type_binders<T: HasInterner<Interner = Interner>>(
136+
pub(crate) fn make_only_type_binders<T: HasInterner<Interner = Interner>>(
137137
num_vars: usize,
138138
value: T,
139139
) -> Binders<T> {

crates/hir_ty/src/primitive.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
//! Defines primitive types, which have a couple of peculiarities:
2-
//!
3-
//! * during type inference, they can be uncertain (ie, `let x = 92;`)
4-
//! * they don't belong to any particular crate.
1+
//! A few helper functions for dealing with primitives.
52
63
pub use chalk_ir::{FloatTy, IntTy, UintTy};
74
pub use hir_def::builtin_type::{BuiltinFloat, BuiltinInt, BuiltinUint};

crates/hir_ty/src/traits.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
//! Trait solving using Chalk.
2+
23
use std::env::var;
34

4-
use base_db::CrateId;
55
use chalk_ir::cast::Cast;
66
use chalk_solve::{logging_db::LoggingRustIrDatabase, Solver};
7+
8+
use base_db::CrateId;
79
use hir_def::{lang_item::LangItemTarget, TraitId};
810
use stdx::panic_context;
911

0 commit comments

Comments
 (0)