diff options
Diffstat (limited to 'src/test')
18 files changed, 28 insertions, 21 deletions
diff --git a/src/test/compile-fail/auxiliary/issue_5844_aux.rs b/src/test/compile-fail/auxiliary/issue_5844_aux.rs index 5c878b1e667..7fa937e93b3 100644 --- a/src/test/compile-fail/auxiliary/issue_5844_aux.rs +++ b/src/test/compile-fail/auxiliary/issue_5844_aux.rs @@ -8,10 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(libc)] - -extern crate libc; - extern "C" { - pub fn rand() -> libc::c_int; + pub fn rand() -> u32; } diff --git a/src/test/compile-fail/issue-10755.rs b/src/test/compile-fail/issue-10755.rs index 1d8db84ab13..87faff27195 100644 --- a/src/test/compile-fail/issue-10755.rs +++ b/src/test/compile-fail/issue-10755.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags: -C linker=llllll +// compile-flags: -C linker=llllll -Z linker-flavor=ld // error-pattern: the linker `llllll` fn main() { diff --git a/src/test/compile-fail/lint-ctypes.rs b/src/test/compile-fail/lint-ctypes.rs index 1d9b179c05d..fd825563eba 100644 --- a/src/test/compile-fail/lint-ctypes.rs +++ b/src/test/compile-fail/lint-ctypes.rs @@ -52,8 +52,6 @@ extern { pub fn fn_type2(p: fn()); //~ ERROR found function pointer with Rust pub fn fn_contained(p: RustBadRet); //~ ERROR: found struct without - pub fn good1(size: *const libc::c_int); - pub fn good2(size: *const libc::c_uint); pub fn good3(fptr: Option<extern fn()>); pub fn good4(aptr: &[u8; 4 as usize]); pub fn good5(s: StructWithProjection); @@ -66,5 +64,11 @@ extern { pub fn good12(size: usize); } +#[cfg(not(target_arch = "wasm32"))] +extern { + pub fn good1(size: *const libc::c_int); + pub fn good2(size: *const libc::c_uint); +} + fn main() { } diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs index 28475b1ef8a..f680e395449 100644 --- a/src/test/compile-fail/lint-dead-code-3.rs +++ b/src/test/compile-fail/lint-dead-code-3.rs @@ -11,11 +11,9 @@ #![allow(unused_variables)] #![allow(non_camel_case_types)] #![deny(dead_code)] -#![feature(libc)] #![crate_type="lib"] -extern crate libc; pub use extern_foo as x; extern { @@ -54,14 +52,13 @@ pub fn pub_fn() { } mod blah { - use libc::size_t; // not warned because it's used in the parameter of `free` and return of // `malloc` below, which are also used. enum c_void {} extern { fn free(p: *const c_void); - fn malloc(size: size_t) -> *const c_void; + fn malloc(size: usize) -> *const c_void; } pub fn baz() { diff --git a/src/test/compile-fail/nolink-with-link-args.rs b/src/test/compile-fail/nolink-with-link-args.rs index c4c75bc760f..6dfd74f541e 100644 --- a/src/test/compile-fail/nolink-with-link-args.rs +++ b/src/test/compile-fail/nolink-with-link-args.rs @@ -9,6 +9,7 @@ // except according to those terms. // error-pattern:aFdEfSeVEE +// compile-flags: -Z linker-flavor=ld /* We're testing that link_args are indeed passed when nolink is specified. So we try to compile with junk link_args and make sure they are visible in diff --git a/src/test/compile-fail/non-copyable-void.rs b/src/test/compile-fail/non-copyable-void.rs index 4383f3ede0d..63e5f963754 100644 --- a/src/test/compile-fail/non-copyable-void.rs +++ b/src/test/compile-fail/non-copyable-void.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-wasm32-bare no libc to test ffi with + #![feature(libc)] extern crate libc; diff --git a/src/test/compile-fail/panic-runtime/libtest-unwinds.rs b/src/test/compile-fail/panic-runtime/libtest-unwinds.rs index 5f6f4ecbd6f..71751034c39 100644 --- a/src/test/compile-fail/panic-runtime/libtest-unwinds.rs +++ b/src/test/compile-fail/panic-runtime/libtest-unwinds.rs @@ -10,6 +10,7 @@ // error-pattern:is not compiled with this crate's panic strategy `abort` // compile-flags:-C panic=abort +// ignore-wasm32-bare compiled with panic=abort by default #![feature(test)] diff --git a/src/test/compile-fail/panic-runtime/transitive-link-a-bunch.rs b/src/test/compile-fail/panic-runtime/transitive-link-a-bunch.rs index 885b3e6dbb9..f886aac9a10 100644 --- a/src/test/compile-fail/panic-runtime/transitive-link-a-bunch.rs +++ b/src/test/compile-fail/panic-runtime/transitive-link-a-bunch.rs @@ -14,6 +14,7 @@ // aux-build:wants-panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs // error-pattern: is not compiled with this crate's panic strategy `unwind` +// ignore-wasm32-bare compiled with panic=abort by default #![no_std] diff --git a/src/test/compile-fail/panic-runtime/want-unwind-got-abort.rs b/src/test/compile-fail/panic-runtime/want-unwind-got-abort.rs index 88ad36f310e..dda92d9a560 100644 --- a/src/test/compile-fail/panic-runtime/want-unwind-got-abort.rs +++ b/src/test/compile-fail/panic-runtime/want-unwind-got-abort.rs @@ -11,6 +11,7 @@ // error-pattern:is incompatible with this crate's strategy of `unwind` // aux-build:panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs +// ignore-wasm32-bare compiled with panic=abort by default #![no_std] diff --git a/src/test/compile-fail/panic-runtime/want-unwind-got-abort2.rs b/src/test/compile-fail/panic-runtime/want-unwind-got-abort2.rs index c42a25a553a..49f719057d2 100644 --- a/src/test/compile-fail/panic-runtime/want-unwind-got-abort2.rs +++ b/src/test/compile-fail/panic-runtime/want-unwind-got-abort2.rs @@ -12,6 +12,7 @@ // aux-build:panic-runtime-abort.rs // aux-build:wants-panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs +// ignore-wasm32-bare compiled with panic=abort by default #![no_std] diff --git a/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs b/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs index f52b128e7e5..c6d744fa64d 100644 --- a/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs +++ b/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs @@ -8,12 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(libc)] - -extern crate libc; - extern { - static mut a: libc::c_int; + static mut a: i32; } fn main() { diff --git a/src/test/compile-fail/unsupported-cast.rs b/src/test/compile-fail/unsupported-cast.rs index 8b63dd51729..5137663a269 100644 --- a/src/test/compile-fail/unsupported-cast.rs +++ b/src/test/compile-fail/unsupported-cast.rs @@ -10,10 +10,8 @@ // error-pattern:casting -#![feature(libc)] - -extern crate libc; +struct A; fn main() { - println!("{:?}", 1.0 as *const libc::FILE); // Can't cast float to foreign. + println!("{:?}", 1.0 as *const A); // Can't cast float to foreign. } diff --git a/src/test/compile-fail/weak-lang-item.rs b/src/test/compile-fail/weak-lang-item.rs index 8eac959fc1e..8579611b938 100644 --- a/src/test/compile-fail/weak-lang-item.rs +++ b/src/test/compile-fail/weak-lang-item.rs @@ -11,6 +11,7 @@ // aux-build:weak-lang-items.rs // error-pattern: language item required, but not found: `panic_fmt` // error-pattern: language item required, but not found: `eh_personality` +// ignore-wasm32-bare compiled with panic=abort, personality not required #![no_std] diff --git a/src/test/mir-opt/box_expr.rs b/src/test/mir-opt/box_expr.rs index f4938fae6a5..74e07d5e864 100644 --- a/src/test/mir-opt/box_expr.rs +++ b/src/test/mir-opt/box_expr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-wasm32-bare compiled with panic=abort by default + #![feature(box_syntax)] fn main() { diff --git a/src/test/mir-opt/issue-41110.rs b/src/test/mir-opt/issue-41110.rs index b409d1fb667..f7f447cc6ba 100644 --- a/src/test/mir-opt/issue-41110.rs +++ b/src/test/mir-opt/issue-41110.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-wasm32-bare compiled with panic=abort by default + // check that we don't emit multiple drop flags when they are not needed. fn main() { diff --git a/src/test/mir-opt/packed-struct-drop-aligned.rs b/src/test/mir-opt/packed-struct-drop-aligned.rs index dc36248811e..0706f185d31 100644 --- a/src/test/mir-opt/packed-struct-drop-aligned.rs +++ b/src/test/mir-opt/packed-struct-drop-aligned.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-wasm32-bare compiled with panic=abort by default + fn main() { let mut x = Packed(Aligned(Droppy(0))); x.0 = Aligned(Droppy(0)); diff --git a/src/test/run-pass/next-power-of-two-overflow-debug.rs b/src/test/run-pass/next-power-of-two-overflow-debug.rs index a3e7ffd4e49..2782f8c2a59 100644 --- a/src/test/run-pass/next-power-of-two-overflow-debug.rs +++ b/src/test/run-pass/next-power-of-two-overflow-debug.rs @@ -9,6 +9,7 @@ // except according to those terms. // compile-flags: -C debug_assertions=yes +// ignore-wasm32-bare compiled with panic=abort by default #![feature(i128_type)] diff --git a/src/test/run-pass/saturating-float-casts.rs b/src/test/run-pass/saturating-float-casts.rs index c8fa49c62a0..4cd171f0ac0 100644 --- a/src/test/run-pass/saturating-float-casts.rs +++ b/src/test/run-pass/saturating-float-casts.rs @@ -10,6 +10,7 @@ // Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction. // compile-flags: -Z saturating-float-casts +// ignore-wasm32-bare FIXME(#46298) needs upstream llvm fixes #![feature(test, i128, i128_type, stmt_expr_attributes)] #![deny(overflowing_literals)] |
