Skip to content

Commit 22f11b8

Browse files
committed
make tests compatible with 2018 edition
1 parent 1ae536b commit 22f11b8

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

tests/compile-fail/ctlz_nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod rusti {
88

99
pub fn main() {
1010
unsafe {
11-
use rusti::*;
11+
use crate::rusti::*;
1212

1313
ctlz_nonzero(0u8); //~ ERROR constant evaluation error: ctlz_nonzero called on 0
1414
}

tests/compile-fail/cttz_nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod rusti {
88

99
pub fn main() {
1010
unsafe {
11-
use rusti::*;
11+
use crate::rusti::*;
1212

1313
cttz_nonzero(0u8); //~ ERROR constant evaluation error: cttz_nonzero called on 0
1414
}

tests/run-pass-fullmir/foreign-fn-linkname.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
// except according to those terms.
1010

1111
//ignore-windows: Uses POSIX APIs
12-
#![feature(libc)]
12+
13+
#![feature(libc, extern_crate_item_prelude)]
14+
#![allow(unused_extern_crates)] // rustc bug https://github.com/rust-lang/rust/issues/56098
1315

1416
extern crate libc;
17+
1518
use std::ffi::CString;
1619

1720
mod mlibc {
1821
use libc::{c_char, size_t};
19-
2022
extern {
2123
#[link_name = "strlen"]
2224
pub fn my_strlen(str: *const c_char) -> size_t;

tests/run-pass-fullmir/memchr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(slice_internals)]
22

3-
extern crate core;
43
use core::slice::memchr::{memchr, memrchr};
54

65
// test fallback implementations on all platforms

tests/run-pass/intrinsics-integer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mod rusti {
2323

2424
pub fn main() {
2525
unsafe {
26-
use rusti::*;
26+
use crate::rusti::*;
2727

2828
assert_eq!(ctpop(0u8), 0); assert_eq!(ctpop(0i8), 0);
2929
assert_eq!(ctpop(0u16), 0); assert_eq!(ctpop(0i16), 0);

0 commit comments

Comments
 (0)