mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 06:54:46 +00:00
improve ui on invalid types for endpoints
This commit is contained in:
parent
90fc17e57d
commit
30edd349ed
9 changed files with 169 additions and 5 deletions
19
tests/ui/endpoint/invalid_placeholders_ty.rs
Normal file
19
tests/ui/endpoint/invalid_placeholders_ty.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
#[macro_use]
|
||||
extern crate gotham_restful;
|
||||
use gotham_restful::gotham::hyper::Method;
|
||||
|
||||
#[derive(Resource)]
|
||||
#[resource(endpoint)]
|
||||
struct FooResource;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct FooPlaceholders {
|
||||
foo: String
|
||||
}
|
||||
|
||||
#[endpoint(method = "Method::GET", uri = ":foo")]
|
||||
fn endpoint(_: FooPlaceholders) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue