Files
jj-vcs-jj/lib/proc-macros
Ilya Grigoriev cd96036178 proc-macros: use re-exported DigestUpdate in ContentHash derive output
Before this commit, external crates trying to use
`#[derive(ContentHash)]` need to explicitly depend on the `digest` crate
because the proc-macro refers to `digest::Update`.

965d6ce4e intended to prevent this inconvenience by introducing a
`jj_lib::content_hash::DigestUpdate` re-export, and it correctly used it
in the macro output. However, 8e1a6c708 ("Add support for generics to
#[derive(ContentHash)]") accidentally reverted it back to
`digest::Update` when rewriting the `quote!` block.

This is the fixup to 8e1a6c708 to make things work as originally
intended. Now, with just a `jj-lib` dependency, the following should
work:

```rust
use jj_lib::content_hash::ContentHash;

#[derive(ContentHash)]
struct Foo {
    x: u32,
    y: String,
}
```
2026-03-14 18:24:59 +00:00
..