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
//! A non-locking, read-only view of an expression node.
//!
//! [`ExprView`] is passed to the closure in [`Expr::replace()`](crate::api::expr::Expr::replace).
//! It provides structural inspection of the current node without
//! acquiring any locks. You **cannot** call `.sin()`, `.expand()`,
//! `format!()`, or any mutating/locking method on this type.
use crateArena;
use crate;
use SmallVec;
/// A non-locking, read-only view into an expression node within the arena.
///
/// This type intentionally does NOT implement `Display`, `Clone`, or any
/// method that would require locking the context. This makes it
/// impossible to deadlock when used inside `Expr::replace()`.
// PartialEq with Expr — compare by ExprId only (no locking needed)