about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-20 22:52:11 +0000
committerbors <bors@rust-lang.org>2018-07-20 22:52:11 +0000
commitee8d23d54445f8d3e62a5e2bd6fde9ac3ff2cf24 (patch)
tree5b1993b8da7f303046ad60ce690ca657cb34bced /src/test
parent878dd0b5e19e086e608351f33bf12e3625425f20 (diff)
parent7bf3578a39e71d61a22beaa121ebd25de2b25738 (diff)
downloadrust-ee8d23d54445f8d3e62a5e2bd6fde9ac3ff2cf24.tar.gz
rust-ee8d23d54445f8d3e62a5e2bd6fde9ac3ff2cf24.zip
Auto merge of #52574 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests

Successful merges:

 - #52502 (fix unsafety: don't call ptr_rotate for ZST)
 - #52505 (rustc: Remove a workaround in ThinLTO fixed upstream)
 - #52526 (Enable run-pass/sepcomp-lib-lto.rs on Android)
 - #52527 (Remove duplicate E0396 tests)
 - #52539 (rustc: Fix two custom attributes with custom derive)
 - #52540 (Fix docker/run.sh script when run locally)
 - #52573 (Cleanups)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-two-attrs.rs22
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs24
-rw-r--r--src/test/run-pass/const-block.rs10
-rw-r--r--src/test/run-pass/sepcomp-lib-lto.rs1
4 files changed, 46 insertions, 11 deletions
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-two-attrs.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-two-attrs.rs
new file mode 100644
index 00000000000..d02edb50fb2
--- /dev/null
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-two-attrs.rs
@@ -0,0 +1,22 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <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.
+
+// no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::*;
+
+#[proc_macro_derive(A, attributes(b))]
+pub fn foo(_x: TokenStream) -> TokenStream {
+    TokenStream::new()
+}
diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs b/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs
new file mode 100644
index 00000000000..6a0a3b3a941
--- /dev/null
+++ b/src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs
@@ -0,0 +1,24 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <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.
+
+// aux-build:derive-two-attrs.rs
+
+#![feature(use_extern_macros)]
+
+extern crate derive_two_attrs as foo;
+
+use foo::A;
+
+#[derive(A)]
+#[b]
+#[b]
+struct B;
+
+fn main() {}
diff --git a/src/test/run-pass/const-block.rs b/src/test/run-pass/const-block.rs
index e56d01d7ba8..e6f191ea952 100644
--- a/src/test/run-pass/const-block.rs
+++ b/src/test/run-pass/const-block.rs
@@ -39,13 +39,6 @@ static BLOCK_FN: fn(usize) -> usize = { foo::<usize> };
 
 static BLOCK_ENUM_CONSTRUCTOR: fn(usize) -> Option<usize> = { Some };
 
-// FIXME #13972
-// static BLOCK_UNSAFE_SAFE_PTR: &'static isize = unsafe { &*(0xdeadbeef as *const isize) };
-// static BLOCK_UNSAFE_SAFE_PTR_2: &'static isize = unsafe {
-//     const X: *const isize = 0xdeadbeef as *const isize;
-//     &*X
-// };
-
 pub fn main() {
     assert_eq!(BLOCK_INTEGRAL, 1);
     assert_eq!(BLOCK_EXPLICIT_UNIT, ());
@@ -58,7 +51,4 @@ pub fn main() {
     assert_eq!(BLOCK_FN_INFERRED(300), 300);
     assert_eq!(BLOCK_FN(300), 300);
     assert_eq!(BLOCK_ENUM_CONSTRUCTOR(200), Some(200));
-    // FIXME #13972
-    // assert_eq!(BLOCK_UNSAFE_SAFE_PTR as *const isize as usize, 0xdeadbeef);
-    // assert_eq!(BLOCK_UNSAFE_SAFE_PTR_2 as *const isize as usize, 0xdeadbeef);
 }
diff --git a/src/test/run-pass/sepcomp-lib-lto.rs b/src/test/run-pass/sepcomp-lib-lto.rs
index f3e52fbd32f..8d73f4db7d2 100644
--- a/src/test/run-pass/sepcomp-lib-lto.rs
+++ b/src/test/run-pass/sepcomp-lib-lto.rs
@@ -14,7 +14,6 @@
 // aux-build:sepcomp_lib.rs
 // compile-flags: -C lto -g
 // no-prefer-dynamic
-// ignore-android FIXME #18800
 
 extern crate sepcomp_lib;
 use sepcomp_lib::a::one;