https://linen.dev logo
Anyone else getting? "error[E0554]: `#![feature]` ...
# help
s
Hey has anyone else hit this? I'm trying to get rocket working with templating now that static folder is a thing, but I'm hitting compilation errors almost straight away... created new project with cargo shuttle init --rocket Added the static folder to my shuttle_service::main - see below. cargo check fails thus: error[E0554]:
#![feature]
may not be used on the stable release channel --> /home/jon/.cargo/registry/src/github.com-1ecc6299db9ec823/thiserror-1.0.38/src/lib.rs:238:34 | 238 | #![cfg_attr(provide_any, feature(provide_any))] | ^^^^^^^^^^^ cargo tree seems to show that thiserror v1.0.38 (*) is a dep of shuttle-service 0.9.0 Hoping this is me doing another noob goof. $ rustc --version rustc 1.67.0 (fc594f156 2023-01-24) OS: pop-os (which I think of as ubuntu wearing a different hat) $ uname -a Linux pop-os 5.19.0-76051900-generic #202207312230~1663791054~22.04~28340d4 SMP PREEMPT_DYNAMIC Wed S x86_64 x86_64 x86_64 GNU/Linux Cargo.toml ... [package] name = "jh-hello-htmx" version = "0.1.0" edition = "2021" publish = false [lib] [dependencies] shuttle-service = { version = "0.9.0", features = ["web-rocket"] } rocket = "0.5.0-rc.2" lib.rs ... #[macro_use] extern crate rocket; use std::path::PathBuf; #[get("/")] fn index() -> &'static str { "Hello, world!" } #[shuttle_service::main] async fn rocket(#[shuttle_static_folder::StaticFolder(folder = "templates")] _static_folder: PathBuf) -> shuttle_service::ShuttleRocket { let rocket = rocket::build().mount("/hello", routes![index]); Ok(rocket) }
Almost certainly me being noob, getting actual code error after a cargo clean; cargo check.
yep, noobness strikes! I didn't cargo add shuttle-static-folder. Doh! Case closed!
14 Views