diff options
Diffstat (limited to 'src/libsyntax/attr')
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 137b94230a3..938fd2767c9 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -89,17 +89,8 @@ pub fn is_known(attr: &Attribute) -> bool { }) } -const RUST_KNOWN_TOOL: &[&str] = &["clippy", "rustfmt"]; -const RUST_KNOWN_LINT_TOOL: &[&str] = &["clippy"]; - -pub fn is_known_tool(attr: &Attribute) -> bool { - let tool_name = - attr.path.segments.iter().next().expect("empty path in attribute").ident.name; - RUST_KNOWN_TOOL.contains(&tool_name.as_str().as_ref()) -} - pub fn is_known_lint_tool(m_item: Ident) -> bool { - RUST_KNOWN_LINT_TOOL.contains(&m_item.as_str().as_ref()) + ["clippy"].contains(&m_item.as_str().as_ref()) } impl NestedMetaItem { @@ -245,10 +236,6 @@ impl Attribute { pub fn is_value_str(&self) -> bool { self.value_str().is_some() } - - pub fn is_scoped(&self) -> bool { - self.path.segments.len() > 1 - } } impl MetaItem { |
