tamer: xir::st: Add missing docs for generated QName constants

This was missed.  It was not possible, using the documentation
alone (without looking at the linked source) to tell what the QName actually
represented, though you could assume by the name.

DEV-7145
main
Mike Gerwitz 2022-06-14 17:00:12 -04:00
parent 3f23bc5e33
commit 9598532d8b
1 changed files with 14 additions and 0 deletions

View File

@ -43,13 +43,27 @@ pub mod qname {
impl QNameCompatibleStaticSymbolId for TameIdentStaticSymbolId {}
#[doc(hidden)]
// rustfmt is over-indenting the doc annotations at the time of writing.
#[rustfmt::skip]
macro_rules! qname_const_inner {
($name:ident = :$local:ident) => {
#[doc=concat!(
"QName with no namespace prefix and local name [`",
stringify!($local),
"`].",
)]
pub const $name: crate::xir::QName =
crate::xir::QName::st_cid_local(&$local);
};
($name:ident = $prefix:ident:$local:ident) => {
#[doc=concat!(
"QName with namespace prefix [`",
stringify!($prefix),
"`] and local name [`",
stringify!($local),
"`].",
)]
pub const $name: crate::xir::QName =
crate::xir::QName::st_cid(&$prefix, &$local);
};