about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-04-11 00:20:05 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-04-11 00:20:05 +0200
commit1c8d2bdda16854743069988fdb50a0185dfcb472 (patch)
tree1864594cd2b846ec2bc878ac058ff9b560944756 /src/test/ui/error-codes
parentae05961fdf5048cb5af27621390dd6c22aaee102 (diff)
downloadrust-1c8d2bdda16854743069988fdb50a0185dfcb472.tar.gz
rust-1c8d2bdda16854743069988fdb50a0185dfcb472.zip
Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, including NLL.
NOTE: I was careful to make each change in a manner that preserves the
existing diagnostic output (usually by ensuring that no lines were
added or removed). This means that the resulting source files are not
as nice to read as they were at the start. But we will have to review
these cases by hand anyway as follow-up work, so cleanup could
reasonably happen then (or not at all).
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0499.rs4
-rw-r--r--src/test/ui/error-codes/E0502.rs4
-rw-r--r--src/test/ui/error-codes/E0503.rs4
-rw-r--r--src/test/ui/error-codes/E0505.rs4
-rw-r--r--src/test/ui/error-codes/E0597.rs4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/error-codes/E0499.rs b/src/test/ui/error-codes/E0499.rs
index 9a64bfe2ea9..c3997236934 100644
--- a/src/test/ui/error-codes/E0499.rs
+++ b/src/test/ui/error-codes/E0499.rs
@@ -7,8 +7,8 @@
 // <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.
-
-fn main() {
+#![feature(rustc_attrs)]
+fn main() { #![rustc_error] // rust-lang/rust#49855
     let mut i = 0;
     let mut x = &mut i;
     let mut a = &mut i; //~ ERROR E0499
diff --git a/src/test/ui/error-codes/E0502.rs b/src/test/ui/error-codes/E0502.rs
index fce8513ca64..9c126bdcde8 100644
--- a/src/test/ui/error-codes/E0502.rs
+++ b/src/test/ui/error-codes/E0502.rs
@@ -7,12 +7,12 @@
 // <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.
-
+#![feature(rustc_attrs)]
 fn bar(x: &mut i32) {}
 fn foo(a: &mut i32) {
     let ref y = a;
     bar(a); //~ ERROR E0502
 }
 
-fn main() {
+fn main() { #![rustc_error] // rust-lang/rust#49855
 }
diff --git a/src/test/ui/error-codes/E0503.rs b/src/test/ui/error-codes/E0503.rs
index 810eb8d9b07..1822a8925d3 100644
--- a/src/test/ui/error-codes/E0503.rs
+++ b/src/test/ui/error-codes/E0503.rs
@@ -7,8 +7,8 @@
 // <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.
-
-fn main() {
+#![feature(rustc_attrs)]
+fn main() { #![rustc_error] // rust-lang/rust#49855
     let mut value = 3;
     let _borrow = &mut value;
     let _sum = value + 1; //~ ERROR E0503
diff --git a/src/test/ui/error-codes/E0505.rs b/src/test/ui/error-codes/E0505.rs
index 2d534b8a44a..dd2980936c0 100644
--- a/src/test/ui/error-codes/E0505.rs
+++ b/src/test/ui/error-codes/E0505.rs
@@ -7,12 +7,12 @@
 // <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.
-
+#![feature(rustc_attrs)]
 struct Value {}
 
 fn eat(val: Value) {}
 
-fn main() {
+fn main() { #![rustc_error] // rust-lang/rust#49855
     let x = Value{};
     {
         let _ref_to_val: &Value = &x;
diff --git a/src/test/ui/error-codes/E0597.rs b/src/test/ui/error-codes/E0597.rs
index 2f4a1da91d8..74178a69444 100644
--- a/src/test/ui/error-codes/E0597.rs
+++ b/src/test/ui/error-codes/E0597.rs
@@ -7,12 +7,12 @@
 // <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.
-
+#![feature(rustc_attrs)]
 struct Foo<'a> {
     x: Option<&'a u32>,
 }
 
-fn main() {
+fn main() { #![rustc_error] // rust-lang/rust#49855
     let mut x = Foo { x: None };
     let y = 0;
     x.x = Some(&y);