about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-09-15 00:51:46 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-10-27 12:06:03 +0300
commit2a852110400c3eccb57edfbd2047fd53e7de9947 (patch)
tree05ebaccbf083dd6149f7b4093af339dd015e4cd9 /src/test/compile-fail
parentbc283c9487b4607d0a97635dca8c8812b886047b (diff)
downloadrust-2a852110400c3eccb57edfbd2047fd53e7de9947.tar.gz
rust-2a852110400c3eccb57edfbd2047fd53e7de9947.zip
Make sufficiently old or low-impact compatibility lints deny-by-default
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/extern-crate-visibility.rs11
-rw-r--r--src/test/compile-fail/inherent-overlap.rs12
-rw-r--r--src/test/compile-fail/issue-6804.rs9
-rw-r--r--src/test/compile-fail/lifetime-underscore.rs2
-rw-r--r--src/test/compile-fail/use-super-global-path.rs10
5 files changed, 16 insertions, 28 deletions
diff --git a/src/test/compile-fail/extern-crate-visibility.rs b/src/test/compile-fail/extern-crate-visibility.rs
index 86aae472148..81e0cb249f3 100644
--- a/src/test/compile-fail/extern-crate-visibility.rs
+++ b/src/test/compile-fail/extern-crate-visibility.rs
@@ -8,9 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-#![allow(unused_imports)]
+#![allow(unused)]
 
 mod foo {
     extern crate core;
@@ -19,11 +17,11 @@ mod foo {
 // Check that private crates can be used from outside their modules, albeit with warnings
 use foo::core; //~ WARN extern crate `core` is private
 //~^ WARN this was previously accepted by the compiler but is being phased out
-use foo::core::cell; //~ WARN extern crate `core` is private
+use foo::core::cell; //~ ERROR extern crate `core` is private
 //~^ WARN this was previously accepted by the compiler but is being phased out
 
 fn f() {
-    foo::core::cell::Cell::new(0); //~ WARN extern crate `core` is private
+    foo::core::cell::Cell::new(0); //~ ERROR extern crate `core` is private
     //~^ WARN this was previously accepted by the compiler but is being phased out
 
     use foo::*;
@@ -39,5 +37,4 @@ mod baz {
     use self::core::cell; // Check that public extern crates are glob imported
 }
 
-#[rustc_error]
-fn main() {} //~ ERROR compilation successful
+fn main() {}
diff --git a/src/test/compile-fail/inherent-overlap.rs b/src/test/compile-fail/inherent-overlap.rs
index 333a4ee04b2..00d41244639 100644
--- a/src/test/compile-fail/inherent-overlap.rs
+++ b/src/test/compile-fail/inherent-overlap.rs
@@ -11,13 +11,12 @@
 // Test that you cannot define items with the same name in overlapping inherent
 // impl blocks.
 
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
+#![allow(unused)]
 
 struct Foo;
 
 impl Foo {
-    fn id() {} //~ WARN duplicate definitions
+    fn id() {} //~ ERROR duplicate definitions
     //~^ WARN previously accepted
 }
 
@@ -28,7 +27,7 @@ impl Foo {
 struct Bar<T>(T);
 
 impl<T> Bar<T> {
-    fn bar(&self) {} //~ WARN duplicate definitions
+    fn bar(&self) {} //~ ERROR duplicate definitions
     //~^ WARN previously accepted
 }
 
@@ -39,7 +38,7 @@ impl Bar<u32> {
 struct Baz<T>(T);
 
 impl<T: Copy> Baz<T> {
-    fn baz(&self) {} //~ WARN duplicate definitions
+    fn baz(&self) {} //~ ERROR duplicate definitions
     //~^ WARN previously accepted
 }
 
@@ -47,5 +46,4 @@ impl<T> Baz<Vec<T>> {
     fn baz(&self) {}
 }
 
-#[rustc_error]
-fn main() {} //~ ERROR compilation successful
+fn main() {}
diff --git a/src/test/compile-fail/issue-6804.rs b/src/test/compile-fail/issue-6804.rs
index 8f2670725ce..f7d3ce60c66 100644
--- a/src/test/compile-fail/issue-6804.rs
+++ b/src/test/compile-fail/issue-6804.rs
@@ -8,16 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-#![feature(slice_patterns)]
-#![allow(dead_code)]
-#![deny(illegal_floating_point_constant_pattern)]
-
 // Matching against NaN should result in a warning
 
+#![feature(slice_patterns)]
+#![allow(unused)]
+
 use std::f64::NAN;
 
-#[rustc_error]
 fn main() {
     let x = NAN;
     match x {
diff --git a/src/test/compile-fail/lifetime-underscore.rs b/src/test/compile-fail/lifetime-underscore.rs
index 102d3576e54..b768009132c 100644
--- a/src/test/compile-fail/lifetime-underscore.rs
+++ b/src/test/compile-fail/lifetime-underscore.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![deny(lifetime_underscore)]
-
 fn _f<'_>() //~ ERROR invalid lifetime name `'_`
 //~^ WARN this was previously accepted
     -> &'_ u8 //~ ERROR invalid lifetime name `'_`
diff --git a/src/test/compile-fail/use-super-global-path.rs b/src/test/compile-fail/use-super-global-path.rs
index 1d0d60a775f..3fa0712fb4c 100644
--- a/src/test/compile-fail/use-super-global-path.rs
+++ b/src/test/compile-fail/use-super-global-path.rs
@@ -8,22 +8,20 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-#![allow(unused_imports, dead_code)]
+#![allow(unused)]
 
 struct S;
 struct Z;
 
 mod foo {
-    use ::super::{S, Z}; //~ WARN global paths cannot start with `super`
+    use ::super::{S, Z}; //~ ERROR global paths cannot start with `super`
     //~^ WARN this was previously accepted by the compiler but is being phased out
 
     pub fn g() {
-        use ::super::main; //~ WARN global paths cannot start with `super`
+        use ::super::main; //~ ERROR global paths cannot start with `super`
         //~^ WARN this was previously accepted by the compiler but is being phased out
         main();
     }
 }
 
-#[rustc_error]
-fn main() { foo::g(); } //~ ERROR compilation successful
+fn main() { foo::g(); }