about summary refs log tree commit diff
path: root/src/test/ui/static
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-03-09 15:03:44 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-03-11 23:10:26 +0300
commitfa72a81bea27f1fda4287475e4cc2f684c971e7f (patch)
treee691a2e38d57c5cd37932754ddf1d8a7048f1f54 /src/test/ui/static
parent2060d49c39e41a286b0425cb2f7ba6022a2d4b96 (diff)
downloadrust-fa72a81bea27f1fda4287475e4cc2f684c971e7f.tar.gz
rust-fa72a81bea27f1fda4287475e4cc2f684c971e7f.zip
Update tests
Diffstat (limited to 'src/test/ui/static')
-rw-r--r--src/test/ui/static/static-items-cant-move.stderr2
-rw-r--r--src/test/ui/static/static-lifetime-bound.stderr4
-rw-r--r--src/test/ui/static/static-lifetime.stderr4
-rw-r--r--src/test/ui/static/static-method-privacy.stderr2
-rw-r--r--src/test/ui/static/static-mut-bad-types.stderr2
-rw-r--r--src/test/ui/static/static-mut-foreign-requires-unsafe.stderr6
-rw-r--r--src/test/ui/static/static-mut-not-pat.stderr2
-rw-r--r--src/test/ui/static/static-mut-requires-unsafe.stderr6
-rw-r--r--src/test/ui/static/static-reference-to-fn-1.stderr2
-rw-r--r--src/test/ui/static/static-reference-to-fn-2.stderr6
-rw-r--r--src/test/ui/static/static-region-bound.stderr2
11 files changed, 19 insertions, 19 deletions
diff --git a/src/test/ui/static/static-items-cant-move.stderr b/src/test/ui/static/static-items-cant-move.stderr
index 1ac772a4601..fc1ed9b8d61 100644
--- a/src/test/ui/static/static-items-cant-move.stderr
+++ b/src/test/ui/static/static-items-cant-move.stderr
@@ -1,7 +1,7 @@
 error[E0507]: cannot move out of static item
   --> $DIR/static-items-cant-move.rs:18:10
    |
-LL |     test(BAR); //~ ERROR cannot move out of static item
+LL |     test(BAR);
    |          ^^^ cannot move out of static item
 
 error: aborting due to previous error
diff --git a/src/test/ui/static/static-lifetime-bound.stderr b/src/test/ui/static/static-lifetime-bound.stderr
index dc8e83610d4..b9aa4d8722b 100644
--- a/src/test/ui/static/static-lifetime-bound.stderr
+++ b/src/test/ui/static/static-lifetime-bound.stderr
@@ -1,7 +1,7 @@
 warning: unnecessary lifetime parameter `'a`
   --> $DIR/static-lifetime-bound.rs:1:6
    |
-LL | fn f<'a: 'static>(_: &'a i32) {} //~WARN unnecessary lifetime parameter `'a`
+LL | fn f<'a: 'static>(_: &'a i32) {}
    |      ^^^^^^^^^^^
    |
    = help: you can use the `'static` lifetime directly, in place of `'a`
@@ -9,7 +9,7 @@ LL | fn f<'a: 'static>(_: &'a i32) {} //~WARN unnecessary lifetime parameter `'a
 error[E0597]: `x` does not live long enough
   --> $DIR/static-lifetime-bound.rs:5:8
    |
-LL |     f(&x); //~ERROR does not live long enough
+LL |     f(&x);
    |        ^ borrowed value does not live long enough
 LL | }
    | - borrowed value only lives until here
diff --git a/src/test/ui/static/static-lifetime.stderr b/src/test/ui/static/static-lifetime.stderr
index 65c60ceb2e3..8516ac07b6c 100644
--- a/src/test/ui/static/static-lifetime.stderr
+++ b/src/test/ui/static/static-lifetime.stderr
@@ -1,13 +1,13 @@
 error[E0478]: lifetime bound not satisfied
   --> $DIR/static-lifetime.rs:3:20
    |
-LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound
+LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
    |                    ^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime 'a as defined on the impl at 3:6
   --> $DIR/static-lifetime.rs:3:6
    |
-LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound
+LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
    |      ^^
    = note: but lifetime parameter must outlive the static lifetime
 
diff --git a/src/test/ui/static/static-method-privacy.stderr b/src/test/ui/static/static-method-privacy.stderr
index c72295f97ca..14ca9f58301 100644
--- a/src/test/ui/static/static-method-privacy.stderr
+++ b/src/test/ui/static/static-method-privacy.stderr
@@ -1,7 +1,7 @@
 error[E0624]: method `new` is private
   --> $DIR/static-method-privacy.rs:9:13
    |
-LL |     let _ = a::S::new();    //~ ERROR method `new` is private
+LL |     let _ = a::S::new();
    |             ^^^^^^^^^
 
 error: aborting due to previous error
diff --git a/src/test/ui/static/static-mut-bad-types.stderr b/src/test/ui/static/static-mut-bad-types.stderr
index e97165705ca..88d62011fc4 100644
--- a/src/test/ui/static/static-mut-bad-types.stderr
+++ b/src/test/ui/static/static-mut-bad-types.stderr
@@ -1,7 +1,7 @@
 error[E0308]: mismatched types
   --> $DIR/static-mut-bad-types.rs:5:13
    |
-LL |         a = true; //~ ERROR: mismatched types
+LL |         a = true;
    |             ^^^^ expected isize, found bool
 
 error: aborting due to previous error
diff --git a/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr b/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr
index 9964e1d98b1..e7ed0b710b2 100644
--- a/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr
+++ b/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr
@@ -1,7 +1,7 @@
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
   --> $DIR/static-mut-foreign-requires-unsafe.rs:6:5
    |
-LL |     a += 3;     //~ ERROR: requires unsafe
+LL |     a += 3;
    |     ^^^^^^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
@@ -9,7 +9,7 @@ LL |     a += 3;     //~ ERROR: requires unsafe
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
   --> $DIR/static-mut-foreign-requires-unsafe.rs:7:5
    |
-LL |     a = 4;      //~ ERROR: requires unsafe
+LL |     a = 4;
    |     ^^^^^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
@@ -17,7 +17,7 @@ LL |     a = 4;      //~ ERROR: requires unsafe
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
   --> $DIR/static-mut-foreign-requires-unsafe.rs:8:14
    |
-LL |     let _b = a; //~ ERROR: requires unsafe
+LL |     let _b = a;
    |              ^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
diff --git a/src/test/ui/static/static-mut-not-pat.stderr b/src/test/ui/static/static-mut-not-pat.stderr
index 0714df0d11d..33c1cd6a595 100644
--- a/src/test/ui/static/static-mut-not-pat.stderr
+++ b/src/test/ui/static/static-mut-not-pat.stderr
@@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow statics
 LL | static mut a: isize = 3;
    | ------------------------ the static `a` is defined here
 ...
-LL |         a => {} //~ ERROR match bindings cannot shadow statics
+LL |         a => {}
    |         ^ cannot be named the same as a static
 
 error[E0530]: match bindings cannot shadow statics
diff --git a/src/test/ui/static/static-mut-requires-unsafe.stderr b/src/test/ui/static/static-mut-requires-unsafe.stderr
index 66ee6989b01..85e468b333c 100644
--- a/src/test/ui/static/static-mut-requires-unsafe.stderr
+++ b/src/test/ui/static/static-mut-requires-unsafe.stderr
@@ -1,7 +1,7 @@
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
   --> $DIR/static-mut-requires-unsafe.rs:4:5
    |
-LL |     a += 3;         //~ ERROR: requires unsafe
+LL |     a += 3;
    |     ^^^^^^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
@@ -9,7 +9,7 @@ LL |     a += 3;         //~ ERROR: requires unsafe
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
   --> $DIR/static-mut-requires-unsafe.rs:5:5
    |
-LL |     a = 4;          //~ ERROR: requires unsafe
+LL |     a = 4;
    |     ^^^^^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
@@ -17,7 +17,7 @@ LL |     a = 4;          //~ ERROR: requires unsafe
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
   --> $DIR/static-mut-requires-unsafe.rs:6:14
    |
-LL |     let _b = a;     //~ ERROR: requires unsafe
+LL |     let _b = a;
    |              ^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
diff --git a/src/test/ui/static/static-reference-to-fn-1.stderr b/src/test/ui/static/static-reference-to-fn-1.stderr
index 84cd6db4c4a..f6d2385ac69 100644
--- a/src/test/ui/static/static-reference-to-fn-1.stderr
+++ b/src/test/ui/static/static-reference-to-fn-1.stderr
@@ -1,7 +1,7 @@
 error[E0308]: mismatched types
   --> $DIR/static-reference-to-fn-1.rs:17:15
    |
-LL |         func: &foo, //~ ERROR mismatched types
+LL |         func: &foo,
    |               ^^^^ expected fn pointer, found fn item
    |
    = note: expected type `&fn() -> std::option::Option<isize>`
diff --git a/src/test/ui/static/static-reference-to-fn-2.stderr b/src/test/ui/static/static-reference-to-fn-2.stderr
index d94913c7e22..17d4a361257 100644
--- a/src/test/ui/static/static-reference-to-fn-2.stderr
+++ b/src/test/ui/static/static-reference-to-fn-2.stderr
@@ -11,7 +11,7 @@ note: borrowed value must be valid for the anonymous lifetime #2 defined on the
    |
 LL | / fn state1(self_: &mut StateMachineIter) -> Option<&'static str> {
 LL | |     self_.statefn = &id(state2 as StateMachineFunc);
-LL | |     //~^ ERROR borrowed value does not live long enough
+LL | |
 LL | |     return Some("state1");
 LL | | }
    | |_^
@@ -30,7 +30,7 @@ note: borrowed value must be valid for the anonymous lifetime #2 defined on the
    |
 LL | / fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> {
 LL | |     self_.statefn = &id(state3 as StateMachineFunc);
-LL | |     //~^ ERROR borrowed value does not live long enough
+LL | |
 LL | |     return Some("state2");
 LL | | }
    | |_^
@@ -49,7 +49,7 @@ note: borrowed value must be valid for the anonymous lifetime #2 defined on the
    |
 LL | / fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> {
 LL | |     self_.statefn = &id(finished as StateMachineFunc);
-LL | |     //~^ ERROR borrowed value does not live long enough
+LL | |
 LL | |     return Some("state3");
 LL | | }
    | |_^
diff --git a/src/test/ui/static/static-region-bound.stderr b/src/test/ui/static/static-region-bound.stderr
index 611f47ddfde..f6bbfcecf6f 100644
--- a/src/test/ui/static/static-region-bound.stderr
+++ b/src/test/ui/static/static-region-bound.stderr
@@ -1,7 +1,7 @@
 error[E0597]: borrowed value does not live long enough
   --> $DIR/static-region-bound.rs:10:14
    |
-LL |     let x = &id(3); //~ ERROR borrowed value does not live long enough
+LL |     let x = &id(3);
    |              ^^^^^ temporary value does not live long enough
 LL |     f(x);
 LL | }