ok, so def-site hygiene can be accounted for by adding an extra field to NAMES
:
// in std::somewhere
#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)]
pub struct FieldName {
pub name: &'static str,
pub hygiene: &'static str,
}
pub struct AnonymousStruct<Fields: std::marker::Tuple, const NAMES: &'static [FieldName]>(pub Fields);
I'm assuming the compiler can provide a unique string for each hygiene, probably a combination of crate name, module path, path to identifier in module, and some optional disambiguator for anonymous scopes. globally nameable hygienes would just be the empty string.