Stream: t-compiler/help

Topic: and_then with Boxed trait object(PR #1495)


Samrat Man Singh (Aug 02 2020 at 17:29, on Zulip):

Hi, I'm trying to make changes to address this comment by @oli: https://github.com/rust-lang/miri/pull/1495/files#r464038285

When I try to pass the returned Box<dyn FileDescriptor> to the as_file_handle method, I get this error:

expected signature of `fn(std::boxed::Box<dyn shims::posix::fs::FileDescriptor<'tcx>>) -> _`

Is my understanding correct that this is due to the compiler not finding the impl for the Boxed trait object?

Here is what I have changed: https://github.com/samrat/miri/commit/054420ffc428e53e6a233b1f5ee73ad0b2bfa59a#diff-560909e2fdd6fac0fb0b832d9470ac7cR460

Last update: Sep 28 2020 at 16:00UTC