gyscos / gyscos/cursive

Can't compile... EnumSetType not found

Open
#548 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

Just asking for help, I am pretty sure I just messed up / forgot something... New to rust and to cursive..

# Problem description
Can't compile the simplest example
Cargo.toml:
```
[dependencies]
cursive = "*"
```
main.rs:
```
use cursive::views::{Dialog, TextView};
fn main() {
let mut siv = cursive::default();
siv.add_layer(Dialog::around(TextView::new("Hello Dialog!"))
.title("Cursive")
.button("Quit", |s| s.quit()));
siv.run();
}
```
Error:
```
/home/denis/.cargo/bin/cargo build --color=always --package tui-app --bin tui-app --message-format=json-diagnostic-rendered-ansi
Compiling cursive_core v0.1.2
error[E0412]: cannot find type `EnumSet` in this scope
--> /home/denis/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.2/src/theme/effect.rs:4:10
|
4 | #[derive(EnumSetType, Debug)]
| ^^^^^^^^^^^ not found in this scope
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
|
1 | use crate::printer::EnumSet;
|
1 | use enumset::EnumSet;
|

error[E0422]: cannot find struct, variant or union type `EnumSet` in this scope
--> /home/denis/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.2/src/theme/effect.rs:4:10
|
4 | #[derive(EnumSetType, Debug)]
| ^^^^^^^^^^^ not found in this scope
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
|
1 | use crate::printer::EnumSet;
|
1 | use enumset::EnumSet;
|

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0412, E0422.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `cursive_core`

```
# Environment
```
~$ rustc --version
rustc 1.49.0 (e1884a8e3 2020-12-29)

~$ uname -r
5.9.0-0.bpo.5-amd64
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.