2020-04-22 01:03:46 +00:00
|
|
|
// normalize-stderr-test: "::: (.*)/core/http" -> "::: $$ROCKET/core/http"
|
|
|
|
|
2018-10-25 09:53:04 +00:00
|
|
|
#[macro_use] extern crate rocket;
|
|
|
|
|
2018-11-27 16:01:47 +00:00
|
|
|
#[derive(UriDisplayQuery)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo1: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo1: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo1: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
2018-10-25 09:53:04 +00:00
|
|
|
struct Foo1;
|
|
|
|
//~^ ERROR not supported
|
|
|
|
|
2018-11-27 16:01:47 +00:00
|
|
|
#[derive(UriDisplayQuery)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo2: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo2: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo2: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
2018-10-25 09:53:04 +00:00
|
|
|
struct Foo2();
|
|
|
|
//~^ ERROR not supported
|
|
|
|
|
2018-11-27 16:01:47 +00:00
|
|
|
#[derive(UriDisplayQuery)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo3: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo3: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo3: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
2018-10-25 09:53:04 +00:00
|
|
|
enum Foo3 { }
|
|
|
|
//~^ ERROR not supported
|
|
|
|
|
2018-11-27 16:01:47 +00:00
|
|
|
#[derive(UriDisplayQuery)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo4: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo4: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo4: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
2018-10-25 09:53:04 +00:00
|
|
|
enum Foo4 {
|
|
|
|
Variant,
|
|
|
|
//~^ ERROR not supported
|
|
|
|
}
|
|
|
|
|
2018-11-27 16:01:47 +00:00
|
|
|
#[derive(UriDisplayQuery)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo5: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo5: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo5: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
2018-10-25 09:53:04 +00:00
|
|
|
struct Foo5(String, String);
|
|
|
|
//~^ ERROR exactly one
|
|
|
|
|
2018-11-27 16:01:47 +00:00
|
|
|
#[derive(UriDisplayQuery)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo6: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo6: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
|
|
|
//~| ERROR Foo6: rocket::http::uri::UriDisplay<rocket::http::uri::Query>
|
2018-10-25 09:53:04 +00:00
|
|
|
struct Foo6 {
|
|
|
|
#[form(field = 123)]
|
|
|
|
//~^ ERROR invalid value: expected string
|
|
|
|
field: String,
|
|
|
|
}
|
2018-11-27 16:01:47 +00:00
|
|
|
|
|
|
|
#[derive(UriDisplayPath)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo7: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
|
|
|
//~| ERROR Foo7: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
2018-11-27 16:01:47 +00:00
|
|
|
struct Foo7(String, usize);
|
|
|
|
//~^ ERROR exactly one
|
|
|
|
|
|
|
|
#[derive(UriDisplayPath)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo8: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
|
|
|
//~| ERROR Foo8: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
2018-11-27 16:01:47 +00:00
|
|
|
struct Foo8;
|
|
|
|
//~^ ERROR exactly one
|
|
|
|
|
|
|
|
#[derive(UriDisplayPath)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo9: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
|
|
|
//~| ERROR Foo9: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
2018-11-27 16:01:47 +00:00
|
|
|
enum Foo9 { }
|
|
|
|
//~^ ERROR not supported
|
|
|
|
|
|
|
|
#[derive(UriDisplayPath)]
|
2018-12-29 17:31:14 +00:00
|
|
|
//~^ ERROR Foo10: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
|
|
|
//~| ERROR Foo10: rocket::http::uri::UriDisplay<rocket::http::uri::Path>
|
2018-11-27 16:01:47 +00:00
|
|
|
struct Foo10 {
|
|
|
|
//~^ ERROR not supported
|
|
|
|
named: usize
|
|
|
|
}
|
2018-12-29 17:31:14 +00:00
|
|
|
|
|
|
|
fn main() { }
|