Skip to content
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

Allow doc comments #97

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Conversation

0HyperCube
Copy link
Contributor

Currently when trying to use a doc comment in an enum with #[derive(specta::Type)], it fails with the following compile error:

error[E0659]: `doc` is ambiguous
  --> editor/src/messages/layout/utility_types/misc.rs:27:2
   |
27 |     /// The color swatch for the working colors and a flip and reset button found at the bottom of the tool shelf.
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a builtin attribute
   = note: `doc` could refer to a built-in attribute
note: `doc` could also refer to the derive helper attribute defined here
  --> editor/src/messages/layout/utility_types/misc.rs:4:83
   |
4  | #[derive(PartialEq, Clone, Debug, Hash, Eq, Copy, Serialize, Deserialize, specta::Type)]
   |                                                                                   ^^^^

@oscartbeaumont
Copy link
Member

Huh, odd. Never had problems with this but given tests pass this should be a fine change.

@oscartbeaumont oscartbeaumont merged commit 5a95e4e into specta-rs:main Aug 7, 2023
4 checks passed
@oscartbeaumont
Copy link
Member

Sorry this is a dead issue but @0HyperCube do you have a link to an example to reproduce this? I mostly just wanted to add a unit test cause Specta's tests were passing before and after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants