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

Placeholder #repr_ty_name in derived attribute wrapper type documentation #576

Open
kpreid opened this issue Dec 28, 2021 · 2 comments
Open

Comments

@kpreid
Copy link
Contributor

kpreid commented Dec 28, 2021

The wrapper types generated by #[derive(Semantics)] have documentation text that is literally

Vertex attribute type (representing #repr_ty_name).

instead of substituting the type name as was presumably intended. Using luminance-derive version 0.8.0.

@hadronized
Copy link
Owner

Argh yeah… I’m not even sure it’s possible to substitute it :(

@kpreid
Copy link
Contributor Author

kpreid commented Dec 31, 2021

Use the #[doc] syntax for doc comments (/// is sugar):

let doc_string = format!("Vertex attribute type (representing {}).", repr_ty_name);
quote! {
    #[doc = #doc_string]
    fn ...
}

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

No branches or pull requests

2 participants