4 // Regression test to ensure we handle debruijn indices correctly in projection
5 // normalization under binders. Found in crater run for #85499
7 use std::future::{Future, Ready};
9 let _ = connect(&()).await;
11 async fn connect<A: ToSocketAddr>(addr: A) {
12 let _ = addr.to_socket_addr().await;
14 pub trait ToSocketAddr {
15 type Future: Future<Output = ()>;
16 fn to_socket_addr(&self) -> Self::Future;
18 impl ToSocketAddr for &() {
19 type Future = Ready<()>;
20 fn to_socket_addr(&self) -> Self::Future {
26 fn and_then<F>(self, _fun: F) -> AndThen<F> {
31 _marker: std::marker::PhantomData<F>,
33 pub async fn run<F>(_: F) {
38 let verification_route = server.and_then(read);
39 run(verification_route).await;