These are chat archives for rust-lang/rust

Dec 2018
Dec 31 2018 00:22
The thing is how to catch the error so you know what to fix
That's what I think @loloof64 is trying to accomplish
match Engine::new {...} or something similar
Ayush Prashar
Dec 31 2018 05:50
Hi guys...I was trying to create an API where in I declare my method in a trait defined in project1 and implement the same same method in another project project2. Both have separate toml files. Now I have this issue where in every declared module , I get an error `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
can any one explain this to me?
Patrick Dignan
Dec 31 2018 06:11
hi, i'm trying to implement some functionality where there's a channel that accepts requests that are contained in a holder with a response and a oneshot to use to pass information back to the caller. i'm using tokio for the oneshot and channel, but that's probably not relevant to the problem. all the requests/responses implement the same trait. i'd like the oneshot to be aware of the request/response type so that the caller can handle different implementors of the trait appropriately. i think i can use a giant enum for this, but there are lots of implementors so that'd be annoying and as well as less convenient ofr any new message types. i have a playground link the probably explains it better than a thousand words: could i implement From somehow to make this work? is this design just wrong? should i just use the enum?
Denis Lisov
Dec 31 2018 16:17
@loloof64 How about making a PR to uci with a version of Engine::new that does not panic?
Dec 31 2018 17:21

@loloof64 btw

|| {

is closure that returns () because of ;