Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/112347.rs: fixed with no errors - #1724

Open
github-actions[bot] wants to merge 1 commit into
masterfrom
autofix/ices/112347.rs
Open

github-actions[bot] wants to merge 1 commit into
masterfrom
autofix/ices/112347.rs

Conversation

@github-actions

@github-actions github-actions Bot commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

Issue: rust-lang/rust#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 ===
==============

=== stdout ===
=== stderr ===
==============
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant