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
I am getting the following error when compiling example.rs
error: cannot find attribute `rustyline` in this scope
--> src/main.rs:15:7
|
15 | #[rustyline(Completer)]
| ^^^^^^^^^
|
= note: `rustyline` is in scope, but it is a crate, not an attribute
error: cannot find attribute `rustyline` in this scope
--> src/main.rs:18:7
|
18 | #[rustyline(Validator)]
| ^^^^^^^^^
|
= note: `rustyline` is in scope, but it is a crate, not an attribute
error: cannot find attribute `rustyline` in this scope
--> src/main.rs:20:7
|
20 | #[rustyline(Hinter)]
| ^^^^^^^^^
|
= note: `rustyline` is in scope, but it is a crate, not an attribute
error: could not compile `x` due to 3 previous errors
cat ../Cargo.toml
[package]
name = "x"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rustyline="9.1"
rustyline-derive="0.6.0"
env_logger="0.9.0"
The text was updated successfully, but these errors were encountered:
You should not mix an example from a github master branch and a released version (9.1).
Either you use the example from master branch and the associated snapshot:
I am getting the following error when compiling example.rs
I am new to rust so I might be doing something wrong.
I did
cargo init
and replaced content of main.rs with example.rs and added rustyline dependency on the cargo.toml.example.rs is from https://github.com/kkawakam/rustyline/blob/master/examples/example.rs
Cargo.toml
The text was updated successfully, but these errors were encountered: