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

Add doc comments for Unwrap, IsVariant #179

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

Technohacker
Copy link
Contributor

@Technohacker Technohacker commented Dec 21, 2021

Prevents a linting issue from missing_docs on the derived functions

Fixes #159

@JelteF
Copy link
Owner

JelteF commented Dec 21, 2021

It seems the new code does not compile on 1.36 because of this issue rust-lang/rust#52607
The second comment in the issue describes a workaround that can probably be used. This bug was only fixed in 1.50

Can you check if it's possible to use this workaround?

@Technohacker
Copy link
Contributor Author

Hmm, I'll have a check on that

@Technohacker
Copy link
Contributor Author

As an aside, would it make sense to add something like unwrap_*_ref and unwrap_*_ref_mut functions to the Unwrap derive, or maybe make a new derive macro for these? Intended for something similar to the enum_as_inner crate, but without having to unwrap the options in between when the type of enum is known

Prevents a linting issue from `missing_docs` on the derived functions
@Technohacker
Copy link
Contributor Author

Turns out my previous code would have expanded the stringify! macro after the Unwrap/IsVariant derive macros, rather than expanding it within the derive itself. New change should fix that

@JelteF JelteF enabled auto-merge (squash) February 8, 2022 11:49
@JelteF JelteF disabled auto-merge February 8, 2022 11:59
@JelteF JelteF merged commit 9e8582b into JelteF:master Feb 8, 2022
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.

#[derive(IsVariant)] clashes with #![deny(missing_docs)]
2 participants