From 6e4f16173c331ca3ccae1ffecc5a69f1ad54f30c Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 20 Jul 2019 03:14:11 +0300 Subject: Demote template check error to a lint for `#[test]` and `#[bench]` --- src/libsyntax/attr/builtin.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/attr') diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs index 71309441652..dbf31ad0148 100644 --- a/src/libsyntax/attr/builtin.rs +++ b/src/libsyntax/attr/builtin.rs @@ -942,7 +942,8 @@ crate fn check_builtin_attribute( // Some of previously accepted forms were used in practice, // report them as warnings for now. let should_warn = |name| name == sym::doc || name == sym::ignore || - name == sym::inline || name == sym::link; + name == sym::inline || name == sym::link || + name == sym::test || name == sym::bench; match attr.parse_meta(sess) { Ok(meta) => if !should_skip(name) && !template.compatible(&meta.node) { -- cgit 1.4.1-3-g733a5