[gen.rs] Factorize mk_*_attr implementations.
[gen.rs] Factorize mk_*_attr implementations.

Twinklebear/rust-bindgen,Twinklebear/rust-bindgen,bsteinb/rust-bindgen,Twinklebear/rust-bindgen,alexander255/rust-bindgen,bsteinb/rust-bindgen,bsteinb/rust-bindgen,alexander255/rust-bindgen,alexander255/rust-bindgen,Twinklebear/rust-bindgen