]> git.lizzy.rs Git - rust.git/commitdiff
Remove tests for deprecated items
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Mon, 28 Jan 2019 09:17:04 +0000 (10:17 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Mon, 28 Jan 2019 09:17:04 +0000 (10:17 +0100)
tests/ui/non_copy_const.rs
tests/ui/non_copy_const.stderr

index bd8b7521d14fd3dd33d1b37991dbef4f3b763af7..00cbcaeacb9f7d56af93b2f8b675d1997ee3a05e 100644 (file)
@@ -4,7 +4,7 @@
 use std::borrow::Cow;
 use std::cell::Cell;
 use std::fmt::Display;
-use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
+use std::sync::atomic::{AtomicUsize, Ordering};
 use std::sync::Once;
 
 const ATOMIC: AtomicUsize = AtomicUsize::new(5); //~ ERROR interior mutable
@@ -95,9 +95,6 @@ fn main() {
     ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
     assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
 
-    ATOMIC_USIZE_INIT.store(2, Ordering::SeqCst); //~ ERROR interior mutability
-    assert_eq!(ATOMIC_USIZE_INIT.load(Ordering::SeqCst), 0); //~ ERROR interior mutability
-
     let _once = ONCE_INIT;
     let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
     let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
index a9584ceb7ec49b5c510fd868423633abda11b824..1276491127ad70ea22c542fab251da1202da3038 100644 (file)
@@ -144,23 +144,7 @@ LL |     assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutabi
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:98:5
-   |
-LL |     ATOMIC_USIZE_INIT.store(2, Ordering::SeqCst); //~ ERROR interior mutability
-   |     ^^^^^^^^^^^^^^^^^
-   |
-   = help: assign this const to a local or static variable, and use the variable here
-
-error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:99:16
-   |
-LL |     assert_eq!(ATOMIC_USIZE_INIT.load(Ordering::SeqCst), 0); //~ ERROR interior mutability
-   |                ^^^^^^^^^^^^^^^^^
-   |
-   = help: assign this const to a local or static variable, and use the variable here
-
-error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:102:22
+  --> $DIR/non_copy_const.rs:99:22
    |
 LL |     let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
    |                      ^^^^^^^^^
@@ -168,7 +152,7 @@ LL |     let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:103:25
+  --> $DIR/non_copy_const.rs:100:25
    |
 LL |     let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
    |                         ^^^^^^^^^
@@ -176,7 +160,7 @@ LL |     let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:104:27
+  --> $DIR/non_copy_const.rs:101:27
    |
 LL |     let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
    |                           ^^^^^^^^^
@@ -184,7 +168,7 @@ LL |     let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:105:26
+  --> $DIR/non_copy_const.rs:102:26
    |
 LL |     let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
    |                          ^^^^^^^^^
@@ -192,7 +176,7 @@ LL |     let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:116:14
+  --> $DIR/non_copy_const.rs:113:14
    |
 LL |     let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
    |              ^^^^^^^^^^^^
@@ -200,7 +184,7 @@ LL |     let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:117:14
+  --> $DIR/non_copy_const.rs:114:14
    |
 LL |     let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
    |              ^^^^^^^^^^^^
@@ -208,7 +192,7 @@ LL |     let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:118:19
+  --> $DIR/non_copy_const.rs:115:19
    |
 LL |     let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
    |                   ^^^^^^^^^^^^
@@ -216,7 +200,7 @@ LL |     let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:119:14
+  --> $DIR/non_copy_const.rs:116:14
    |
 LL |     let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
    |              ^^^^^^^^^^^^
@@ -224,7 +208,7 @@ LL |     let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:120:13
+  --> $DIR/non_copy_const.rs:117:13
    |
 LL |     let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
    |             ^^^^^^^^^^^^
@@ -232,7 +216,7 @@ LL |     let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mu
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:126:13
+  --> $DIR/non_copy_const.rs:123:13
    |
 LL |     let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
    |             ^^^^^^^^^^^^
@@ -240,7 +224,7 @@ LL |     let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:131:5
+  --> $DIR/non_copy_const.rs:128:5
    |
 LL |     CELL.set(2); //~ ERROR interior mutability
    |     ^^^^
@@ -248,7 +232,7 @@ LL |     CELL.set(2); //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:132:16
+  --> $DIR/non_copy_const.rs:129:16
    |
 LL |     assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
    |                ^^^^
@@ -256,7 +240,7 @@ LL |     assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:145:5
+  --> $DIR/non_copy_const.rs:142:5
    |
 LL |     u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
    |     ^^^^^^^^^^^
@@ -264,12 +248,12 @@ LL |     u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
    = help: assign this const to a local or static variable, and use the variable here
 
 error: a const item with interior mutability should not be borrowed
-  --> $DIR/non_copy_const.rs:146:16
+  --> $DIR/non_copy_const.rs:143:16
    |
 LL |     assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
    |                ^^^^^^^^^^^
    |
    = help: assign this const to a local or static variable, and use the variable here
 
-error: aborting due to 31 previous errors
+error: aborting due to 29 previous errors