From db718d72aef42618343cbefb0350ac95b1f80af0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 10 Nov 2020 16:51:07 +0100 Subject: [PATCH] remove some unnecessary feature flags --- tests/compile-fail/check_arg_count_too_few_args.rs | 1 - tests/compile-fail/check_arg_count_too_many_args.rs | 1 - tests/compile-fail/shim_arg_size.rs | 2 -- tests/run-pass/calloc.rs | 4 ++-- tests/run-pass/fs.rs | 4 ++-- tests/run-pass/malloc.rs | 4 ++-- tests/run-pass/regions-mock-trans.rs | 1 + 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/compile-fail/check_arg_count_too_few_args.rs b/tests/compile-fail/check_arg_count_too_few_args.rs index c6c19e042dd..f8d11832683 100644 --- a/tests/compile-fail/check_arg_count_too_few_args.rs +++ b/tests/compile-fail/check_arg_count_too_few_args.rs @@ -1,5 +1,4 @@ #![feature(core_intrinsics)] -#![feature(rustc_private)] fn main() { extern "C" { diff --git a/tests/compile-fail/check_arg_count_too_many_args.rs b/tests/compile-fail/check_arg_count_too_many_args.rs index cca03e53ec1..5163d223fa4 100644 --- a/tests/compile-fail/check_arg_count_too_many_args.rs +++ b/tests/compile-fail/check_arg_count_too_many_args.rs @@ -1,5 +1,4 @@ #![feature(core_intrinsics)] -#![feature(rustc_private)] fn main() { extern "C" { diff --git a/tests/compile-fail/shim_arg_size.rs b/tests/compile-fail/shim_arg_size.rs index dd8d6dac51d..556195d6e90 100644 --- a/tests/compile-fail/shim_arg_size.rs +++ b/tests/compile-fail/shim_arg_size.rs @@ -1,5 +1,3 @@ -#![feature(rustc_private)] - fn main() { extern "C" { // Use the wrong type(ie. not the pointer width) for the `size` diff --git a/tests/run-pass/calloc.rs b/tests/run-pass/calloc.rs index 6793f86c116..9f614ce971b 100644 --- a/tests/run-pass/calloc.rs +++ b/tests/run-pass/calloc.rs @@ -2,10 +2,10 @@ #![feature(rustc_private)] -use core::slice; - extern crate libc; +use core::slice; + fn main() { unsafe { let p1 = libc::calloc(0, 0); diff --git a/tests/run-pass/fs.rs b/tests/run-pass/fs.rs index f74d1c9a36b..1261dbf1768 100644 --- a/tests/run-pass/fs.rs +++ b/tests/run-pass/fs.rs @@ -3,6 +3,8 @@ #![feature(rustc_private)] +extern crate libc; + use std::fs::{ File, create_dir, OpenOptions, read_dir, remove_dir, remove_dir_all, remove_file, rename, }; @@ -10,8 +12,6 @@ use std::ffi::CString; use std::io::{Read, Write, Error, ErrorKind, Result, Seek, SeekFrom}; use std::path::{PathBuf, Path}; -extern crate libc; - fn main() { test_file(); diff --git a/tests/run-pass/malloc.rs b/tests/run-pass/malloc.rs index 8e0d9ac6293..b8eb7b50d34 100644 --- a/tests/run-pass/malloc.rs +++ b/tests/run-pass/malloc.rs @@ -2,10 +2,10 @@ #![feature(rustc_private)] -use core::{slice, ptr}; - extern crate libc; +use core::{slice, ptr}; + fn main() { // Test that small allocations sometimes *are* not very aligned. let saw_unaligned = (0..64).any(|_| unsafe { diff --git a/tests/run-pass/regions-mock-trans.rs b/tests/run-pass/regions-mock-trans.rs index 0b2433d84fa..23ec91461db 100644 --- a/tests/run-pass/regions-mock-trans.rs +++ b/tests/run-pass/regions-mock-trans.rs @@ -3,6 +3,7 @@ #![feature(rustc_private)] extern crate libc; + use std::mem; struct Arena(());