Custom Into<Arc<dyn Fn(...)>>> not works, but Box does

Related to #63994, but in my cases, it's arc.

This is the working code, from Yandros, #63994,

But this code is using Arc, but having error.

Why it doesn't work for Arc, but works for Box?

Oh, I found the answer. The problem was missing impl IntoArc for Arc and also bound T: ?Sized.

This is working code. Rust Playground

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.