]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-59326.rs
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-59326.rs
1 // check-pass
2 trait Service {
3     type S;
4 }
5
6 trait Framing {
7     type F;
8 }
9
10 impl Framing for () {
11     type F = ();
12 }
13
14 trait HttpService<F: Framing>: Service<S = F::F> {}
15
16 type BoxService = Box<dyn HttpService<(), S = ()>>;
17
18 fn build_server<F: FnOnce() -> BoxService>(_: F) {}
19
20 fn make_server<F: Framing>() -> Box<dyn HttpService<F, S = F::F>> {
21     unimplemented!()
22 }
23
24 fn main() {
25     build_server(|| make_server())
26 }