Files
axum/axum-macros/tests/from_request/fail/generic_without_via_rejection.rs
T

13 lines
265 B
Rust
Raw Normal View History

2022-08-17 17:13:31 +02:00
use axum::{body::Body, routing::get, Router};
use axum_macros::FromRequest;
#[derive(FromRequest, Clone)]
#[from_request(rejection(Foo))]
struct Extractor<T>(T);
async fn foo(_: Extractor<()>) {}
fn main() {
2022-08-17 17:13:31 +02:00
Router::<(), Body>::new().route("/", get(foo));
}