Wilfred / difftastic

a structural diff that understands syntax 🟥🟩

Home Page:https://difftastic.wilfred.me.uk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The compilation failed due to tree_magic_mini-3.1.3

zhuzhzh opened this issue · comments

cargo build --release hit the following error.

error[E0446]: private type `MagicRule<'static>` in public interface
  --> /home/harriszh/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tree_magic_mini-3.1.3/src/fdo_magic/builtin/runtime.rs:54:1
   |
54 | pub fn rules() -> Result<FnvHashMap<Mime, DiGraph<MagicRule<'static>, u32>>, String> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
   |
  ::: /home/harriszh/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tree_magic_mini-3.1.3/src/fdo_magic/mod.rs:6:1
   |
6  | struct MagicRule<'a> {
   | -------------------- `MagicRule<'static>` declared as private

error[E0446]: private type `MagicRule<'_>` in public interface
  --> /home/harriszh/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tree_magic_mini-3.1.3/src/fdo_magic/check.rs:31:1
   |
31 | / pub fn from_u8_walker(
32 | |     bytes: &[u8],
33 | |     graph: &DiGraph<super::MagicRule, u32>,
34 | |     node: NodeIndex,
35 | |     isroot: bool,
36 | | ) -> bool {
   | |_________^ can't leak private type
   |
  ::: /home/harriszh/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tree_magic_mini-3.1.3/src/fdo_magic/mod.rs:6:1
   |
6  |   struct MagicRule<'a> {
   |   -------------------- `MagicRule<'_>` declared as private

error[E0446]: private type `MagicRule<'_>` in public interface
   --> /home/harriszh/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tree_magic_mini-3.1.3/src/fdo_magic/ruleset.rs:113:1
    |
113 | / pub fn from_multiple(
114 | |     files: &[Vec<u8>],
115 | | ) -> Result<FnvHashMap<&str, DiGraph<MagicRule<'_>, u32>>, String> {
    | |__________________________________________________________________^ can't leak private type
    |
   ::: /home/harriszh/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tree_magic_mini-3.1.3/src/fdo_magic/mod.rs:6:1
    |
6   |   struct MagicRule<'a> {
    |   -------------------- `MagicRule<'_>` declared as private

For more information about this error, try `rustc --explain E0446`.
error: could not compile `tree_magic_mini` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

Fixed, thanks for the report :)