make tests compatible with 2018 edition
This commit is contained in:
parent
1ae536b03e
commit
22f11b8eec
@ -8,7 +8,7 @@ mod rusti {
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
use rusti::*;
|
||||
use crate::rusti::*;
|
||||
|
||||
ctlz_nonzero(0u8); //~ ERROR constant evaluation error: ctlz_nonzero called on 0
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ mod rusti {
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
use rusti::*;
|
||||
use crate::rusti::*;
|
||||
|
||||
cttz_nonzero(0u8); //~ ERROR constant evaluation error: cttz_nonzero called on 0
|
||||
}
|
||||
|
@ -9,14 +9,16 @@
|
||||
// except according to those terms.
|
||||
|
||||
//ignore-windows: Uses POSIX APIs
|
||||
#![feature(libc)]
|
||||
|
||||
#![feature(libc, extern_crate_item_prelude)]
|
||||
#![allow(unused_extern_crates)] // rustc bug https://github.com/rust-lang/rust/issues/56098
|
||||
|
||||
extern crate libc;
|
||||
|
||||
use std::ffi::CString;
|
||||
|
||||
mod mlibc {
|
||||
use libc::{c_char, size_t};
|
||||
|
||||
extern {
|
||||
#[link_name = "strlen"]
|
||||
pub fn my_strlen(str: *const c_char) -> size_t;
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![feature(slice_internals)]
|
||||
|
||||
extern crate core;
|
||||
use core::slice::memchr::{memchr, memrchr};
|
||||
|
||||
// test fallback implementations on all platforms
|
||||
|
@ -23,7 +23,7 @@ mod rusti {
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
use rusti::*;
|
||||
use crate::rusti::*;
|
||||
|
||||
assert_eq!(ctpop(0u8), 0); assert_eq!(ctpop(0i8), 0);
|
||||
assert_eq!(ctpop(0u16), 0); assert_eq!(ctpop(0i16), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user