Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gets cannot find `__req` & '__data' in this scope errors
#![feature(proc_macro_hygiene, decl_macro)]
extern crate rocket;
macro_rules! index {
($type:ty) => {
fn index(thing: rocket::State<$type>) -> String {
format!("Thing: {}", *thing)
fn main() {
rocket::ignite().manage::<i32>(42).mount("/", routes![index]).launch();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment