Skip to content

A lifetime error while copying nano_rs.rs example code #564

Closed Answered by Chiichen
Chiichen asked this question in Q&A
Discussion options

You must be logged in to vote

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 edition = “2021”:

[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 …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@Chiichen
Comment options

@zesterer
Comment options

Comment options

You must be logged in to vote
1 reply
@zesterer
Comment options

Answer selected by Chiichen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants