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

17 lines
547 B
Rust
Raw Normal View History

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