summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-101984.rs
blob: 5f7ecb77e0ed4a952a65b89706a48b6ac3cecc1d (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
27
use std::marker::PhantomData;

type Component = fn(&());

struct Wrapper {
    router: Router<(Component, Box<Self>)>,
}

struct Match<C>(PhantomData<C>);

struct Router<T>(PhantomData<T>);

impl<T> Router<T> {
    pub fn at(&self) -> Result<Match<&T>, ()> {
        todo!()
    }
}

impl Wrapper {
    fn at(&self, path: &str) -> Result<(Component, Box<Self>), ()> {
        let (cmp, router) = self.router.at()?;
        //~^ ERROR mismatched types
        todo!()
    }
}

fn main() {}