Show the span of feature that is unstable when using a feature-list.
This commit is contained in:
parent
84b1e08486
commit
70db73a330
1 changed files with 5 additions and 1 deletions
|
@ -2203,7 +2203,11 @@ impl LintPass for UnstableFeatures {
|
||||||
}
|
}
|
||||||
fn check_attribute(&mut self, ctx: &Context, attr: &ast::Attribute) {
|
fn check_attribute(&mut self, ctx: &Context, attr: &ast::Attribute) {
|
||||||
if attr::contains_name(&[attr.node.value.clone()], "feature") {
|
if attr::contains_name(&[attr.node.value.clone()], "feature") {
|
||||||
ctx.span_lint(UNSTABLE_FEATURES, attr.span, "unstable feature");
|
if let Some(items) = attr.node.value.meta_item_list() {
|
||||||
|
for item in items {
|
||||||
|
ctx.span_lint(UNSTABLE_FEATURES, item.span, "unstable feature");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue