1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! HIR provides high-level, object-oriented access to Mun code. It is constructed by first parsing
//! Mun code with the mun_syntax crate and then it is lowered into HIR constructs, names are
//! resolved, and type checking is performed. HIR is the input for both the compiler as well as the
//! language server.

#![allow(dead_code)]

pub use salsa;

pub use crate::{
    db::{
        AstDatabase, AstDatabaseStorage, DefDatabase, DefDatabaseStorage, HirDatabase,
        HirDatabaseStorage, InternDatabase, InternDatabaseStorage, SourceDatabase,
        SourceDatabaseStorage, Upcast,
    },
    diagnostics::{Diagnostic, DiagnosticSink},
    display::HirDisplay,
    expr::{
        ArithOp, BinaryOp, Body, CmpOp, Expr, ExprId, ExprScopes, Literal, LogicOp, Ordering, Pat,
        PatId, RecordLitField, Statement, UnaryOp,
    },
    ids::{ItemLoc, ModuleId},
    in_file::InFile,
    input::{FileId, SourceRoot, SourceRootId},
    name::Name,
    name_resolution::PerNs,
    package_set::{PackageId, PackageSet},
    path::{Path, PathKind},
    primitive_type::{FloatBitness, IntBitness, Signedness},
    resolve::{resolver_for_expr, resolver_for_scope, Resolver, TypeNs, ValueNs},
    ty::{
        lower::CallableDef, FloatTy, InferenceResult, IntTy, ResolveBitness, Substitution, Ty,
        TyKind,
    },
    visibility::{HasVisibility, Visibility},
};
use crate::{name::AsName, source_id::AstIdMap};

pub use self::code_model::{
    Field, Function, FunctionData, HasSource, Module, ModuleDef, Package, Struct, StructMemoryKind,
    TypeAlias,
};

#[macro_use]
mod macros;
#[macro_use]
mod arena;
mod code_model;
mod db;
pub mod diagnostics;
mod display;
mod expr;
mod ids;
mod in_file;
mod input;
mod item_tree;
pub mod line_index;
mod module_tree;
mod name;
mod name_resolution;
mod path;
mod primitive_type;
mod resolve;
mod source_id;
mod ty;
mod type_ref;
mod utils;

pub mod fixture;
mod item_scope;
#[cfg(test)]
mod mock;
mod package_defs;
mod package_set;
pub mod semantics;
mod source_analyzer;
#[cfg(test)]
mod tests;
mod visibility;
pub mod with_fixture;