1 // Regression test for #55241:
3 // The reference to `C::HASHED_NULL_NODE` resulted in a type like `<C
4 // as NodeCodec<_>>::Out`; normalizing this type requires knowing the
5 // value of `_`; solving that requires having normalized, so we can
6 // test against `C: NodeCodec<H>` in the environment.
14 pub trait NodeCodec<H: Hasher> {
15 const HASHED_NULL_NODE: H::Out;
18 pub trait Trie<H: Hasher, C: NodeCodec<H>> {
19 /// Returns the root of the trie.
20 fn root(&self) -> &H::Out;
22 /// Is the trie empty?
23 fn is_empty(&self) -> bool { *self.root() == C::HASHED_NULL_NODE }