make tests compatible with 2018 edition

This commit is contained in:
Ralf Jung 2018-11-20 14:11:27 +01:00
parent 1ae536b03e
commit 22f11b8eec
5 changed files with 7 additions and 6 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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;

View File

@ -1,6 +1,5 @@
#![feature(slice_internals)]
extern crate core;
use core::slice::memchr::{memchr, memrchr};
// test fallback implementations on all platforms

View File

@ -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);