Rocket/codegen/tests/compile-fail/ignored_params.rs

17 lines
559 B
Rust
Raw Normal View History

#![feature(plugin, decl_macro)]
2016-09-09 03:38:58 +00:00
#![plugin(rocket_codegen)]
#[get("/<name>")] //~ ERROR unused dynamic parameter: `name`
fn get(other: usize) -> &'static str { "hi" } //~ NOTE expected
#[get("/a?<r>")] //~ ERROR unused dynamic parameter: `r`
fn get1() -> &'static str { "hi" } //~ NOTE expected
2016-09-29 03:39:14 +00:00
#[post("/a", data = "<test>")] //~ ERROR unused dynamic parameter: `test`
fn post() -> &'static str { "hi" } //~ NOTE expected
2016-09-29 03:39:14 +00:00
#[get("/<_r>")] //~ ERROR unused dynamic parameter: `_r`
fn get2(r: usize) -> &'static str { "hi" } //~ NOTE expected
2017-08-03 01:44:31 +00:00
fn main() { }