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 newish to Rust and Rocket. I am trying to use Figment with Rocket but it doesn't compile. I am getting this error:
|
= note: see issue #47809 rust-lang/rust#47809 for more information
= help: add #![feature(track_caller)] to the crate attributes to enable
error[E0658]: the #[track_caller] attribute is an experimental feature
--> /home/yg/.cargo/registry/src/github.com-1ecc6299db9ec823/figment-0.9.4/src/figment.rs:176:5
|
176 | #[track_caller]
| ^^^^^^^^^^^^^^^
|
= note: see issue #47809 rust-lang/rust#47809 for more information
= help: add #![feature(track_caller)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'track_caller': uses #[track_caller] which is not yet stable
--> /home/yg/.cargo/registry/src/github.com-1ecc6299db9ec823/figment-0.9.4/src/providers/serialized.rs:80:18
|
80 | loc: Location::caller()
| ^^^^^^^^^^^^^^^^
This is from my Cargo.toml:
serde = { version = "1.0", features = ["derive"] }
figment = { version = "0.9", features = ["toml", "env"] }
This is my main function:
fnmain(){let port = env::var("PORT").expect("$PORT must be set");let figment = Figment::new().merge(Toml::file("Rocket.toml")).merge(Env::prefixed("ROCKET_"));
rocket::custom(figment).attach(DbConn::fairing()).mount("/",routes![
posts::list,
posts::new
]).launch();}
I added #[macro_use] extern crate figment; to my main.rs as well but didnt help
The text was updated successfully, but these errors were encountered:
Hi,
I am newish to Rust and Rocket. I am trying to use Figment with Rocket but it doesn't compile. I am getting this error:
This is from my Cargo.toml:
This is my main function:
I added
#[macro_use] extern crate figment;
to my main.rs as well but didnt helpThe text was updated successfully, but these errors were encountered: