mirror of
https://github.com/rwf2/Rocket.git
synced 2025-02-01 06:12:04 +00:00
084481a84e
This is a breaking change. All Rocket applications using code generation must now additionally declare usage of the 'decl_macro' feature.
32 lines
747 B
Rust
32 lines
747 B
Rust
#![feature(plugin, decl_macro)]
|
|
#![plugin(rocket_codegen)]
|
|
|
|
#[get("/><")] //~ ERROR malformed
|
|
fn get() -> &'static str { "hi" }
|
|
|
|
#[get("/<id><")] //~ ERROR malformed
|
|
fn get1(id: usize) -> &'static str { "hi" }
|
|
|
|
#[get("/<<<<id><")] //~ ERROR malformed
|
|
fn get2(id: usize) -> &'static str { "hi" }
|
|
|
|
#[get("/<!>")] //~ ERROR identifiers
|
|
fn get3() -> &'static str { "hi" }
|
|
|
|
#[get("/<_>")] //~ ERROR named
|
|
fn get4() -> &'static str { "hi" }
|
|
|
|
#[get("/<1>")] //~ ERROR identifiers
|
|
fn get5() -> &'static str { "hi" }
|
|
|
|
#[get("/<>name><")] //~ ERROR malformed
|
|
fn get6() -> &'static str { "hi" }
|
|
|
|
#[get("/<name>:<id>")] //~ ERROR identifiers
|
|
fn get7() -> &'static str { "hi" }
|
|
|
|
#[get("/<>")] //~ ERROR empty
|
|
fn get8() -> &'static str { "hi" }
|
|
|
|
fn main() { }
|