Closed ghost closed 6 years ago
You need to place
#![feature(plugin)]
#![plugin(rocket_codegen)]
at the crate root. This is usually src/main.rs. Note that this is true for Rust in general: crate attributes need to be at the crate root.
Thanks. problem has been solved @SergioBenitez
@SergioBenitez I'd actually be curious what your opinions are of more rigidly enforcing a project structure (like Django or ember.js)
Questions
I am using Rocket 0.3.6,In my project, I want organize my files like this: ----pro
I want to organize all routes in a mod, but when I finished it in route/mod.rs,
![feature(plugin)]
![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket_codegen;
[get("/world")]
fn world() -> &'static str { "Hello,World" } something wrong!
does the route have to place in src/main.rs? how to solve this? thanks.