Rocket/codegen/tests/error-handler.rs

25 lines
470 B
Rust

#![feature(plugin, decl_macro)]
#![plugin(rocket_codegen)]
extern crate rocket;
use rocket::{Error, Request};
#[catch(404)]
fn err0() -> &'static str { "hi" }
#[catch(404)]
fn err1a(_err: Error) -> &'static str { "hi" }
#[catch(404)]
fn err1b(_req: &Request) -> &'static str { "hi" }
#[catch(404)]
fn err2a(_err: Error, _req: &Request) -> &'static str { "hi" }
#[catch(404)]
fn err2b<'a>(_err: Error, _req: &'a Request) -> &'a str { "hi" }
#[test]
fn main() { }