auto string_path = path.as_string ();
/* assume that cfg predicate actually can exist, i.e. attribute has cfg or
* cfg_attr path */
- if (!has_attr_input ()
- || (string_path != Values::Attributes::CFG
- && string_path != Values::Attributes::CFG_ATTR))
+ if (!has_attr_input ())
{
- // DEBUG message
- rust_debug (
- "tried to check cfg predicate on attr that either has no input "
- "or invalid path. attr: '%s'",
- as_string ().c_str ());
-
+ rust_error_at (path.get_locus (), "%qs is not followed by parentheses",
+ string_path.c_str ());
return false;
}
return false;
auto &meta_item = static_cast<AttrInputMetaItemContainer &> (*attr_input);
- if (meta_item.get_items ().empty ()
- && (string_path == Values::Attributes::CFG
- || string_path == Values::Attributes::CFG_ATTR))
+ if (meta_item.get_items ().empty ())
{
rust_error_at (path.get_locus (), "malformed %<%s%> attribute input",
string_path.c_str ());