File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242//! be the natural one, *e.g.* `HConSet<Term>`.
4343//!
4444//! However, since `Term` is really an alias for `HConsed<RTerm>`, then if we wanted to declare
45- //! `HConSet` as an alias for `HashSet` we would get `type HConSet<Inner> = HashSet< HConsed<Inner>
46- //! >` (omitting the custom hasher). That is, our sets would have type `HConSet<RTerm>`, which is
47- //! not very pretty. We could just define an alias though: `type TermSet = HConSet<RTerm>`, but it
48- //! turns out it's better to wrap the actual set in a `struct` anyway. Mostly to be able to define
49- //! `new` and `with_capacity` without relying on a trait (users would need to import) to do that.
45+ //! `HConSet` as an alias for `HashSet` we would get `type HConSet<Inner> = HashSet<HConsed<Inner>>`
46+ //! (omitting the custom hasher). That is, our sets would have type `HConSet<RTerm>`, which is not
47+ //! very pretty. We could just define an alias though: `type TermSet = HConSet<RTerm>`, but it turns
48+ //! out it's better to wrap the actual set in a `struct` anyway. Mostly to be able to define `new`
49+ //! and `with_capacity` without relying on a trait (users would need to import) to do that.
5050//!
5151//! So actually `HConsed` types automatically implement the internal `trait HashConsed { type Inner;
5252//! }`. The sole purpose of this trait (currently) is to pass the inner type implicitly thanks to a
You can’t perform that action at this time.
0 commit comments