Add comment

This commit is contained in:
Seiichi Uchida 2018-08-06 22:34:58 +09:00
parent 4ad1c66001
commit a201d856d1

View File

@ -47,6 +47,9 @@ fn path_value(attr: &ast::Attribute) -> Option<Symbol> {
}
}
// 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()
}