diff options
| author | Falco Hirschenberger <falco.hirschenberger@gmail.com> | 2015-05-18 16:37:05 +0200 |
|---|---|---|
| committer | Falco Hirschenberger <falco.hirschenberger@gmail.com> | 2015-05-18 16:37:05 +0200 |
| commit | 70db73a33011794622e22f10fbc0c6b2cae4292c (patch) | |
| tree | 8611837a8ed6ffb86ec70ea31e8087df6afeb00d | |
| parent | 84b1e084862c08c19c36f0cf1f3698343c8ba7fa (diff) | |
| download | rust-70db73a33011794622e22f10fbc0c6b2cae4292c.tar.gz rust-70db73a33011794622e22f10fbc0c6b2cae4292c.zip | |
Show the span of feature that is unstable when using a feature-list.
| -rw-r--r-- | src/librustc_lint/builtin.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 8d555240e70..adce0c145b7 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -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"); + } + } } } } |
