Closed
Description
[Not sure if this is an issue indeed, or a small "feature request".]
As the subject says, trying to use the regex
crate version 1.0.0
, without the default features, and with the latest nightly (2018-05-18) fails with the following compile time error:
error[E0432]: unresolved import `Error`
--> /home/ciprian/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.0.0/src/compile.rs:25:5
|
25 | use Error;
| ^^^^^ no `Error` in the root. Did you mean to use `error`?
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
The way I include the dependency is:
[dependencies.regex]
version = "~1.0.0"
optional = true
features = []
default-features = false
It seems that with the default-features = true
and without any additional features enabled, it succeeds. On further investigation it seems that requiring (without default features) just use_std
succeeds, which is in fact the default.
If the crate does require that one always use use_std
, then perhaps a compile time error would be helpful, like for example:
#[ cfg ( not ( feature = "use_std" ) ) ]
compile_error! ("`use_std` feature is currently required to build this crate");
Metadata
Metadata
Assignees
Labels
No labels