mirror of
https://github.com/rwf2/Rocket.git
synced 2024-12-29 05:42:35 +00:00
3e4f8453ce
Also removes one internal use in the 'typed-uris' codegen test.
27 lines
718 B
Rust
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() { }
|