]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/issue-101623.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / suggestions / issue-101623.rs
1 pub struct Stuff {
2 inner: *mut (),
3 }
4
5 pub struct Wrap<T>(T);
6
7 fn fun<T>(t: T) -> Wrap<T> {
8 todo!()
9 }
10
11 pub trait Trait<'de> {
12 fn do_stuff(_: Wrap<&'de mut Self>);
13 }
14
15 impl<'a> Trait<'a> for () {
16 fn do_stuff(_: Wrap<&'a mut Self>) {}
17 }
18
19 fn fun2(t: &mut Stuff) -> () {
20 let Stuff { inner, .. } = t;
21 Trait::do_stuff({ fun(&mut *inner) });
22 //~^ ERROR the trait bound `*mut (): Trait<'_>` is not satisfied
23 }
24
25 fn main() {}