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
//! Scope and variable-binding types for the HIR.
//!
//! The HIR models lexical scoping explicitly. Each [`Scope`] contains a list
//! of [`Binding`] IDs. Bindings represent named variables with their
//! introduction site and the semantic role in which they were bound.
use ;
use crateSpan;
/// A lexical scope in the HIR.
///
/// Scopes form a tree: each scope optionally refers to a parent scope.
/// Variable resolution walks up the tree from the current scope.
/// A named variable binding in the HIR.
///
/// Every variable occurrence in the query that has been successfully resolved
/// is backed by a `Binding` stored in the [`crate::hir::arena::HirArenas`].
/// The semantic role in which a variable was introduced.