Fix up a few more tests
This commit is contained in:
parent
44d679b902
commit
8d3bc55904
@ -1,10 +1,7 @@
|
||||
#![crate_type = "staticlib"]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
|
||||
use libc::{c_char, c_double, c_int, c_long, c_longlong};
|
||||
use std::ffi::{c_char, c_double, c_int, c_long, c_longlong};
|
||||
use std::ffi::VaList;
|
||||
use std::ffi::{CString, CStr};
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
use std::ffi::c_int;
|
||||
|
||||
#[link(name = "foo", kind = "static")]
|
||||
extern "C" {
|
||||
fn should_return_one() -> libc::c_int;
|
||||
fn should_return_one() -> c_int;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -1,21 +1,15 @@
|
||||
// Ensure that env::vars() does not panic if environ is null.
|
||||
// Regression test for rust-lang/rust#53200
|
||||
//@ run-pass
|
||||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
//@ ignore-windows
|
||||
|
||||
// issue-53200
|
||||
|
||||
#![feature(rustc_private)]
|
||||
extern crate libc;
|
||||
|
||||
use std::env;
|
||||
|
||||
// FIXME: more platforms?
|
||||
#[cfg(target_os = "linux")]
|
||||
fn main() {
|
||||
extern crate libc;
|
||||
unsafe { libc::clearenv(); }
|
||||
assert_eq!(env::vars().count(), 0);
|
||||
assert_eq!(std::env::vars().count(), 0);
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
|
@ -8,21 +8,16 @@
|
||||
//@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590)
|
||||
//@ ignore-nto no stack overflow handler used (no alternate stack available)
|
||||
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(rustc_private)]
|
||||
|
||||
#[cfg(unix)]
|
||||
extern crate libc;
|
||||
|
||||
use std::env;
|
||||
use std::hint::black_box;
|
||||
use std::process::Command;
|
||||
use std::thread;
|
||||
|
||||
// Inlining to avoid llvm turning the recursive functions into tail calls,
|
||||
// which doesn't consume stack.
|
||||
#[inline(always)]
|
||||
pub fn black_box<T>(dummy: T) { std::intrinsics::black_box(dummy); }
|
||||
|
||||
fn silent_recurse() {
|
||||
let buf = [0u8; 1000];
|
||||
black_box(buf);
|
||||
|
@ -20,7 +20,6 @@
|
||||
//@ error-pattern: Location is heap block of size 4
|
||||
//@ error-pattern: allocated by main thread
|
||||
|
||||
#![feature(raw_ref_op)]
|
||||
#![feature(rustc_private)]
|
||||
extern crate libc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user