glacier icon indicating copy to clipboard operation
glacier copied to clipboard

ices/112347.rs: fixed with no errors

Open github-actions[bot] opened this issue 1 year ago • 0 comments

Issue: https://github.com/rust-lang/rust/issues/112347

#![feature(unboxed_closures)]

use std::future::Future;

trait Trait {
    fn func(&self, _: &str);
}

impl<T> Trait for T
where
    for<'a> T: Fn<(&'a str,)> + Send + Sync,
    for<'a> <T as FnOnce<(&'a str,)>>::Output: Future<Output = usize> + Send,
{
    fn func(&self, _: &str) {
        println!("hello!");
    }
}

async fn strlen(x: &str) -> usize {
    x.len()
}

fn main() {
    strlen.func("hi");
}

=== stdout ===
=== stderr ===
==============

github-actions[bot] avatar Apr 03 '24 03:04 github-actions[bot]