Skip to content

Accept Docstring for Struct Fields#41

Open
julianbuettner wants to merge 1 commit into
mcmah309:masterfrom
julianbuettner:main
Open

Accept Docstring for Struct Fields#41
julianbuettner wants to merge 1 commit into
mcmah309:masterfrom
julianbuettner:main

Conversation

@julianbuettner
Copy link
Copy Markdown

Motivation

I really missed the feature to add docstrings to fields, especially when using #![warn(missing_docs)] or something alike.

Context

Full disclaimer: the generated changes are llm assisted, but the changes are small enough so that I think they are reviewable.

How to test

cargo new x

use error_set::error_set;

error_set! {
    Foo := {
        Bar {
            /// This is a docstring
            foo: u8,
        }
    }
}

And compare both verions of error_set:

[dependencies]
# comment one!
error_set = "0.9.1"
error_set = { git = "https://github.com/julianbuettner/error_set.git", rev = "12dda7ed37108d74456d89f88667c08b936c54fd" }

Then run cargo doc and open the docs

@julianbuettner julianbuettner mentioned this pull request May 2, 2026
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.

1 participant