-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc --lib par.rs -L . -->> error: internal compiler error: can't make T_opaque_trait with bare trait store #6940
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
Comments
rustic -v rustc 0.6 (5f13e9c 2013-04-02 13:36:51 -0700) |
Hi, thanks for the bug report, but I couldn't build your code... par.rs depends on bootstrap, which contains numerous errors and I gave up after fixing some of them. |
My apologies, I hope you did not spend to much time on it. I was in the middle of re-factoring when I ran into the compiler issue. I will tidy up and re-submit, if necessary. Thanks. |
Take 2 after a promised tidy up on my part, I am still getting the reported compiler error. You now only need fit.rs and par.rs to reproduce it. fit.rs contains the trait in question par.rs tries to use it. Here is a link to this commit: https://github.com/JeffMurray/must/tree/32050866d1316bd9fafef925c8a1e671bc4194b4/src It is likely I am doing something wrong but I am not sure what a bare trait store is. My goal is to simply pass a connection to ParFitable.connect( ... ) Thanks in advance for any feedback. |
line 121 in par.rs is an example of passing a DuplexStream to a fn defined through the ParFitable trait which has me stumped. -> https://github.com/JeffMurray/must/blob/32050866d1316bd9fafef925c8a1e671bc4194b4/src/par.rs#L121 |
Thanks for fixing the errors. I compiled your code with the newest version of rust (the "incoming" branch). After fixing up some small library changes, this resulted in the following error:
Bare traits, i.e. without any pointer indirection, have a dynamic size, as it's impossible to know which object that implements the trait will be used. As a consequence, bare traits can not be instantiated, you have to use a pointer indirection. After fixing your code up to use |
Thank you :) |
Still: rustic -v rustc 0.6 (5f13e9c 2013-04-02 13:36:51 -0700) Rather than creating a new thread, I am re-opening this one to note that I am am receiving an odd warning when compiling must/src/par.rs https://github.com/JeffMurray/must/tree/05a14237c5e6b119c39cb418f271b3a2239964ff/src rustc --lib par.rs -L . RecvInChan is an enum that I am matching. Sorry if I am making an obvious mistake. Thanks, Jeff |
You haven't imported the RecvInChan name, so you have a catch-all binding named RecvInChan instead. |
RecvInChan is part of an enum declared in this rs. I am not sure I understand. Thanks anyway. |
No it's not. You seem to have renamed it to RecvInPort. |
On my, you are right. |
`implicit_return` improvements fixes: rust-lang#6940 changelog: Fix `implicit_return` suggestion for async functions changelog: Improve `implicit_return` suggestions when returning the result of a macro changelog: Check for `break` expressions inside a loop which are then implicitly returned changelog: Allow all diverging functions in `implicit_return`, not just panic functions
Here is a link to the code at this point in time.
https://github.com/JeffMurray/must/tree/29fd8652674a1b1009d7a168fc544c830fdce87c/src
I am getting the error when compiling par.rs, but I am guessing the opaque trait the compiler is referring to is ParFitable in fit.rs.
Thanks for making Rust, and sorry if I am making a noob mistake :)
The text was updated successfully, but these errors were encountered: