-
Notifications
You must be signed in to change notification settings - Fork 13.3k
#[deriving()], concrete implementations and problems with traits #15923
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
Closing as working as intended, the You'll likely want to either derive clone in both circumstances or manually implement |
Ok, thanks for the explanation, that's too bad though :( Of course I'd prefer using |
We've been discussing recently how one might customize deriving, but nothing concrete is currently implemented as of yet. |
…r=Veykril feat: ignored and disabled macro expansion Supersedes rust-lang#15117, I was having some conflicts after a rebase and since I didn't remember much of it I started clean instead. The end result is pretty much the same as the linked PR, but instead of proc macro lookups, I marked the expanders that explicitly cannot be expanded and we shouldn't even attempt to do so. ## Unresolved questions - [ ] I introduced a `DISABLED_ID` next to `DUMMY_ID` in `hir-expand`'s `ProcMacroExpander`, that is effectively exactly the same thing with slightly different semantics, dummy macros are not (yet) expanded probably due to errors, while not expanding disabled macros is part of the usual flow. I'm not sure if it's the right way to handle this, I also thought of just adding a flag instead of replacing the macro ID, so that the disabled macro can still be expanded for any reason if needed.
The following code fails to compile:
With the following error:
Whereas when
#[deriving(Clone)]
is used onSFoo
instead of providing a concrete implementation for theClone
trait it compiles correctly:It seems to me that the code in the first case should also compile without error.
The text was updated successfully, but these errors were encountered: