inventory: Inventory doesn't work with Rust >= 1.54
Hey there!
It seems inventory v0.1.10 does not work with Rust 1.54 as with Rust 1.53 before. I tested it with my project, when I run with cargo +1.53 run -- "1" it works as expected, when I try to run it with just cargo run -- "1" on a rustc 1.54 stable toolchain, no plugins are registered anymore.
Your example code from here runs as expected.
In my project in this mod.rs the for-loop at the end is never executed, as the inventory::iter::<Builtin> always returns None as first call to next(). I found out, that when I copy the plugins from the modules _std, string and token (first three mod lines) directly into the mod.rs, it works as expected. So inventory seems to not register plugins from other modules with Rust 1.54 anymore?
Can you give me a hint?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (2 by maintainers)
This is fixed in rustc 1.62.0 / inventory 0.3.0.