hadronized / luminance-rs

Type-safe, type-level and stateless Rust graphics framework
https://phaazon.github.io/learn-luminance/
Other
1.09k stars 59 forks source link

Placeholder `#repr_ty_name` in derived attribute wrapper type documentation #576

Open kpreid opened 2 years ago

kpreid commented 2 years ago

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 commented 2 years ago

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

kpreid commented 2 years ago

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 ...
}