+fn path_value(attr: &ast::Attribute) -> Option<Symbol> {
+ if attr.name() == "path" {
+ attr.value_str()
+ } else {
+ None
+ }
+}
+
+// N.B. Even when there are multiple `#[path = ...]` attributes, we just need to
+// examine the first one, since rustc ignores the second and the subsequent ones
+// as unused attributes.
+fn find_path_value(attrs: &[ast::Attribute]) -> Option<Symbol> {
+ attrs.iter().flat_map(path_value).next()
+}
+