]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-8860.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / issue-8860.rs
index d775f23bab4ac3ca39adbc3cdc82bea02796a93b..35f713c4c2c0bc23cebf873d79be9970c9e40916 100644 (file)
@@ -8,24 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-extern crate green;
-
 static mut DROP: int = 0i;
 static mut DROP_S: int = 0i;
 static mut DROP_T: int = 0i;
 
-#[start]
-fn start(argc: int, argv: *const *const u8) -> int {
-    let ret = green::start(argc, argv, green::basic::event_loop, main);
-    unsafe {
-        assert_eq!(2, DROP);
-        assert_eq!(1, DROP_S);
-        assert_eq!(1, DROP_T);
-    }
-    ret
-}
-
 struct S;
 impl Drop for S {
     fn drop(&mut self) {
@@ -48,7 +34,7 @@ fn drop(&mut self) {
 }
 fn g(ref _t: T) {}
 
-fn main() {
+fn do_test() {
     let s = S;
     f(s);
     unsafe {
@@ -59,3 +45,12 @@ fn main() {
     g(t);
     unsafe { assert_eq!(1, DROP_T); }
 }
+
+fn main() {
+    do_test();
+    unsafe {
+        assert_eq!(2, DROP);
+        assert_eq!(1, DROP_S);
+        assert_eq!(1, DROP_T);
+    }
+}