summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-101623.rs
blob: d18a4a21f0a518b25534451faa880f53f37e779b (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
pub struct Stuff {
    inner: *mut (),
}

pub struct Wrap<T>(T);

fn fun<T>(t: T) -> Wrap<T> {
    todo!()
}

pub trait Trait<'de> {
    fn do_stuff(_: Wrap<&'de mut Self>);
}

impl<'a> Trait<'a> for () {
    fn do_stuff(_: Wrap<&'a mut Self>) {}
}

fn fun2(t: &mut Stuff) -> () {
    let Stuff { inner, .. } = t;
    Trait::do_stuff({ fun(&mut *inner) });
    //~^ ERROR the trait bound `*mut (): Trait<'_>` is not satisfied
}

fn main() {}