summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-59326.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-59326.rs')
-rw-r--r--tests/ui/issues/issue-59326.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-59326.rs b/tests/ui/issues/issue-59326.rs
new file mode 100644
index 000000000..c0e883774
--- /dev/null
+++ b/tests/ui/issues/issue-59326.rs
@@ -0,0 +1,26 @@
+// check-pass
+trait Service {
+ type S;
+}
+
+trait Framing {
+ type F;
+}
+
+impl Framing for () {
+ type F = ();
+}
+
+trait HttpService<F: Framing>: Service<S = F::F> {}
+
+type BoxService = Box<dyn HttpService<(), S = ()>>;
+
+fn build_server<F: FnOnce() -> BoxService>(_: F) {}
+
+fn make_server<F: Framing>() -> Box<dyn HttpService<F, S = F::F>> {
+ unimplemented!()
+}
+
+fn main() {
+ build_server(|| make_server())
+}