Rocket/core/codegen/tests/dynamic-paths.rs

17 lines
441 B
Rust
Raw Normal View History

#![feature(plugin, decl_macro, proc_macro_non_items)]
2016-09-29 03:39:14 +00:00
#![plugin(rocket_codegen)]
2017-09-10 08:19:38 +00:00
#![allow(dead_code, unused_variables)]
2016-09-29 03:39:14 +00:00
#[macro_use] extern crate rocket;
2016-09-29 03:39:14 +00:00
#[get("/test/<one>/<two>/<three>")]
fn get(one: String, two: usize, three: isize) -> &'static str { "hi" }
2016-09-29 03:39:14 +00:00
2017-08-03 01:44:31 +00:00
#[get("/test/<_one>/<_two>/<__three>")]
fn ignored(_one: String, _two: usize, __three: isize) -> &'static str { "hi" }
2017-09-10 08:19:38 +00:00
#[test]
2016-09-29 03:39:14 +00:00
fn main() {
2017-08-03 01:44:31 +00:00
let _ = routes![get, ignored];
2016-09-29 03:39:14 +00:00
}