-
I am trying to copy the nano_rs.rs example code into my workspace using 1.0.0-alpha6. But it leads to a lifetime error
I am wondering if there is any other settings or features are expected to turn on in my cargo project |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Are you copying the example as-is? And if so, what compiler version are you using? |
Beta Was this translation helpful? Give feedback.
-
I've already figured out that this lifetime error is caused by a wrong cargo.toml file without specifying the edition like this. [package]
name = "nano_rs"
version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
chumsky = { version = "1.0.0-alpha.6", features = ["label"] }
ariadne = "0.3.0" But once specified [package]
name = "nano_rs"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
chumsky = { version = "1.0.0-alpha.6", features = ["label"] }
ariadne = "0.3.0" this error no longer occured. I'm not sure about the principle of the edition flag while compiling.But it works anyway. Thanks for your answer |
Beta Was this translation helpful? Give feedback.
I've already figured out that this lifetime error is caused by a wrong cargo.toml file without specifying the edition like this.
But once specified
edition = “2021”
:this error no longer occured. I'm not …