You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let p:Box<dynPredicate<str>> = Box::new(always());
I expected to see this happen: It should compile fine
Instead this happened: Build fails with this error:
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> src/constant.rs:86:38
|
86 | let p: Box<dyn Predicate<str>> = Box::new(always());
| ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `str`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required because of the requirements on the impl of `predicates_core::core::Predicate<str>` for `constant::BooleanPredicate`
= note: required for the cast to the object type `dyn predicates_core::core::Predicate<str>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
I tried this code:
I expected to see this happen: It should compile fine
Instead this happened: Build fails with this error:
Meta
predicates-rs version: 1.0.1
rustc --version --verbose
:Originally reported at asomers/mockall#78
The text was updated successfully, but these errors were encountered: