rocket_codegen 0.2.9

Code generation for the Rocket web framework.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(plugin)]
#![plugin(rocket_codegen)]

extern crate rocket;

#[get("/", format = "application/x-custom")] //~ WARNING not a known content-type
fn one() -> &'static str { "hi" }

#[get("/", format = "x-custom/plain")] //~ WARNING not a known content-type
fn two() -> &'static str { "hi" }

#[get("/", format = "x-custom/x-custom")] //~ WARNING not a known content-type
fn three() -> &'static str { "hi" }

// Make the test fail here so we can actually check for the warnings above.
assert!(false);

fn main() {  }