-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary workaround for compiler bugs in impl Trait feature. #91
Conversation
Now that google/tarpc#91 has landed
Was this about a linker error when trying to implement FutureClient from a separate crate? Was running into issues with that the other night. Tracked this down, if it's of any assistance: rust-lang/rust#35870. Modifying the macro to mark service methods inline resolved the issue in my case. |
That's interesting. That issue also talks about some visibility issues. I wonder if that is actually the underlying problem since the full type has some types that needed to be public with this change. Maybe just making those public would make it go away. |
@mcmathja yeah, that bug came up in our discussion on gitter yesterday too — thanks for confirming! @compressed I just tried locally reverting the signature change in 9d552e4, but keeping the visibility modifiers, and that then still causes the linking error for me unfortunately :/ |
Thanks for the info @mcmathja! Do you happen to have a reproduction you can share? I'd love to open a rustc issue. |
Played around with this for a bit and the issue is more subtle than I thought. The calls to ::rt::begin_panic("internal error: entered unreachable code",
{
static _FILE_LINE: (&'static str, u32) = ("src/lib.rs", 7u32);
&_FILE_LINE
}) For me at least, it seems to be those
Replacing the macros with concrete errors resolves the issue. It's beyond me why only those two calls need to be replaced, I haven't been able to set up a more generic reproduction. (Have the one I used to generate those errors here). Looks like a different bug from the one I linked earlier in any case. |
Yup, that looks like my error too. |
Interestingly, I get a bunch of these errors if I try to compile |
So here's something interesting: I now have mit-pdos/noria@b7abc6e compiling on one machine, and failing with a linker error on another, just using |
Travis also complains: https://travis-ci.org/mit-pdos/distributary/builds/208844288#L682 |
A |
Following this up in rust-lang/rust#35870 (comment) |
We will want to revert this as soon as possible. There's not really a good way to test whether it's fixed because we don't even have a rustc bug right now to track.
cc @jonhoo