tamer: ir::xir::qname_const_inner: Fully qualified QName paths

This macro was previously using the path of wherever the template expanded
into, which I found to be unexpected considering that I thought the macros
were hygenic and the names bound to the environment in which they were
defined.

In any case, this solves the problem in all cases.

DEV-10863
main
Mike Gerwitz 2021-10-28 21:19:11 -04:00
parent f0f58a6e16
commit ba3b576c93
1 changed files with 4 additions and 2 deletions

View File

@ -96,11 +96,13 @@ impl QNameCompatibleStaticSymbolId for TameIdentStaticSymbolId {}
#[doc(hidden)]
macro_rules! qname_const_inner {
($name:ident = :$local:ident) => {
const $name: QName = QName::st_cid_local(&$local);
const $name: crate::ir::xir::QName =
crate::ir::xir::QName::st_cid_local(&$local);
};
($name:ident = $prefix:ident:$local:ident) => {
const $name: QName = QName::st_cid(&$prefix, &$local);
const $name: crate::ir::xir::QName =
crate::ir::xir::QName::st_cid(&$prefix, &$local);
};
}