Rocket/core/codegen/tests/ui-fail/route-warnings.rs
Jeb Rosen 3e4f8453ce Remove use of the 'decl_macro' feature.
Also removes one internal use in the 'typed-uris' codegen test.
2019-07-19 11:39:56 -07:00

27 lines
718 B
Rust

// must-compile-successfully
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
// Check for unknown media types.
#[get("/", format = "application/x-custom")] //~ WARNING not a known media type
fn f0() {}
#[get("/", format = "x-custom/plain")] //~ WARNING not a known media type
fn f1() {}
#[get("/", format = "x-custom/x-custom")] //~ WARNING not a known media type
fn f2() {}
// Check if a data argument is used with a usually non-payload bearing method.
#[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
fn g0(_foo: rocket::Data) {}
#[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
fn g1(_foo: rocket::Data) {}
fn main() { }