summaryrefslogtreecommitdiff
path: root/axum-macros/tests/debug_handler/fail/extract_self_ref.rs
blob: 8e32811994aed3ee07666e5c925bb0d53bd10b0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use axum::{
    async_trait,
    extract::{Request, FromRequest},
};
use axum_macros::debug_handler;

struct A;

#[async_trait]
impl<S> FromRequest<S> for A
where
    S: Send + Sync,
{
    type Rejection = ();

    async fn from_request(_req: Request, _state: &S) -> Result<Self, Self::Rejection> {
        unimplemented!()
    }
}

impl A {
    #[debug_handler]
    async fn handler(&self) {}
}

fn main() {}