Error compiling luminal v0.2.0
mortont opened this issue · comments
Travis Morton commented
I've added luminal as a dependency in my project but when building I get the following errors
error[E0445]: crate-private trait `ExpressionStorage` in public interface
--> /home/tmorton/.cargo/registry/src/index.crates.io-6f17d22bba15001f/luminal-0.2.0/src/core/shape/symbolic.rs:70:1
|
21 | / pub(crate) trait ExpressionStorage:
22 | | Clone
23 | | + IndexMut<usize, Output = Term>
24 | | + std::iter::Extend<Term>
25 | | + IntoIterator<Item = Term>
26 | | + Default
| |_____________- `ExpressionStorage` declared as crate-private
...
70 | pub struct GenericExpression<S: ExpressionStorage> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait
error[E0445]: crate-private trait `ExpressionStorage` in public interface
--> /home/tmorton/.cargo/registry/src/index.crates.io-6f17d22bba15001f/luminal-0.2.0/src/core/shape/symbolic.rs:119:1
|
21 | / pub(crate) trait ExpressionStorage:
22 | | Clone
23 | | + IndexMut<usize, Output = Term>
24 | | + std::iter::Extend<Term>
25 | | + IntoIterator<Item = Term>
26 | | + Default
| |_____________- `ExpressionStorage` declared as crate-private
...
119 | impl<S: ExpressionStorage> GenericExpression<S> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait
error[E0445]: crate-private trait `ExpressionStorage` in public interface
--> /home/tmorton/.cargo/registry/src/index.crates.io-6f17d22bba15001f/luminal-0.2.0/src/core/shape/symbolic.rs:437:1
|
21 | / pub(crate) trait ExpressionStorage:
22 | | Clone
23 | | + IndexMut<usize, Output = Term>
24 | | + std::iter::Extend<Term>
25 | | + IntoIterator<Item = Term>
26 | | + Default
| |_____________- `ExpressionStorage` declared as crate-private
...
437 | impl<S: ExpressionStorage> GenericExpression<S>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait
For more information about this error, try `rustc --explain E0445`.
error: could not compile `luminal` (lib) due to 3 previous errors
Looks like pub(crate) trait ExpressionStorage: needs to be pub
access rather than pub(crate)
Joe Fioti commented
Interesting, I didn't know that was exposed in a public interface. I changed the visibility, should be working on main