Show the span of feature that is unstable when using a feature-list.
This commit is contained in:
parent
84b1e08486
commit
70db73a330
@ -2203,7 +2203,11 @@ impl LintPass for UnstableFeatures {
|
||||
}
|
||||
fn check_attribute(&mut self, ctx: &Context, attr: &ast::Attribute) {
|
||||
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…
Reference in New Issue
Block a user