From cc31d9cabcc6c8ad396c1aae6257a4b5ea25cb46 Mon Sep 17 00:00:00 2001 From: P1start Date: Sun, 5 Oct 2014 12:27:42 +1300 Subject: Give a more descriptive error when marking non-test items as #[test] Closes #14772. --- src/test/compile-fail/issue-14772.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/compile-fail/issue-14772.rs (limited to 'src/test/compile-fail') diff --git a/src/test/compile-fail/issue-14772.rs b/src/test/compile-fail/issue-14772.rs new file mode 100644 index 00000000000..aaaad67be52 --- /dev/null +++ b/src/test/compile-fail/issue-14772.rs @@ -0,0 +1,16 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: --test + +#[test] +mod foo {} //~ ERROR only functions may be used as tests + +fn main() {} -- cgit 1.4.1-3-g733a5