I'm chaining and flatmapping some iterators and procs together in an attempt to get make some code execute lazily. Unfortunately I'm getting an error I can't overcome.
The error refers to the return type and says 'expected no bounds but found Send
'. I've never had to include 'Send' in the return type description before and rustc won't parse e.g. collections::vec::MoveItems:Send>. How should I include Send in the type signature?
(Or should I be doing something else?)
../racer/nameres.rs:623:12: 623:14 error: mismatched types: expected
core::iter::Chain<core::iter::Chain<core::iter::Chain<core::iter::Chain<core::iter::FlatMap<'static,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>,core::iter::FlatMap<'static,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>,core::iter::FlatMap<'static,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>,core::iter::FlatMap<'static,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>,core::iter::FlatMap<'static,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>
but foundcore::iter::Chain<core::iter::Chain<core::iter::Chain<core::iter::Chain<core::iter::FlatMap<'_,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>,core::iter::FlatMap<'_,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>,core::iter::FlatMap<'_,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>,core::iter::FlatMap<'_,proc() -> collections::vec::MoveItems<racer::Match>,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>>,collections::vec::MoveItems<racer::Match>>>,core::iter::FlatMap<'_,proc() -> collections::vec::MoveItems<racer::Match>:Send,core::option::Item<proc() -> collections::vec::MoveItems<racer::Match>:Send>,collections::vec::MoveItems<racer::Match>>>
(expected no bounds but foundSend
)