about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2013-07-11 12:54:06 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2013-07-11 12:54:06 +0900
commitf20c78c984d0e93d94420c9bddf17c06303de6e7 (patch)
treebfdc43b91b6c37f7a1be571394c791371f94f72e
parentf81986031ca8c67525b149159b051d51a638dc89 (diff)
downloadrust-f20c78c984d0e93d94420c9bddf17c06303de6e7.tar.gz
rust-f20c78c984d0e93d94420c9bddf17c06303de6e7.zip
Add a compile-fail test for qualification lint
-rw-r--r--src/test/compile-fail/lint-qualification.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/compile-fail/lint-qualification.rs b/src/test/compile-fail/lint-qualification.rs
new file mode 100644
index 00000000000..a6775c51c45
--- /dev/null
+++ b/src/test/compile-fail/lint-qualification.rs
@@ -0,0 +1,20 @@
+// Copyright 2013 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[deny(unnecessary_qualification)];
+
+mod foo {
+    pub fn bar() {}
+}
+
+fn main() {
+    use foo::bar;
+    foo::bar(); //~ ERROR: unnecessary qualification
+}