Skip to content

Commit a0af369

Browse files
committed
Update the tests for latest rustc
1 parent 3f7127d commit a0af369

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

examples/simpleapi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Lua script, and reads back the return value.
66

77
#![allow(non_snake_case)]
8-
#![feature(path,io,env,core)]
8+
#![feature(old_path,old_io,env,core)]
99

1010
extern crate lua;
1111

examples/sine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(non_snake_case)]
2-
#![feature(libc,io,core)]
2+
#![feature(libc,old_io,core)]
33

44
#[macro_use]
55
extern crate lua;

src/rawtests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ fn test_dostring() {
6060
let L = aux::raw::luaL_newstate();
6161
raw::lua_atpanic(L, panic_helper);
6262
let s = "function foo(x,y) return x+y end";
63-
let ret = aux::raw::luaL_dostring(L, CString::from_slice(s.as_bytes()).as_ptr());
63+
let ret = aux::raw::luaL_dostring(L, CString::new(s).unwrap().as_ptr());
6464
assert_eq!(ret, 0);
65-
raw::lua_getglobal(L, CString::from_slice(b"foo").as_ptr());
65+
raw::lua_getglobal(L, CString::new(b"foo").unwrap().as_ptr());
6666

6767
raw::lua_pushinteger(L, 5);
6868
raw::lua_pushinteger(L, 3);

src/tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Type;
44
use raw;
55

66
use libc;
7-
use std::thread::Thread;
7+
use std::thread;
88

99
#[test]
1010
fn test_state_init() {
@@ -21,7 +21,7 @@ fn test_error() {
2121

2222
#[test]
2323
fn test_errorstr() {
24-
let res = Thread::scoped::<(), _>(move || {
24+
let res = thread::spawn(|| {
2525
let mut s = State::new();
2626
s.errorstr("some err");
2727
}).join();
@@ -92,13 +92,13 @@ fn test_checkoption() {
9292
}
9393
assert_eq!(*s.checkoption(1, Some("three"), &lst), CheckOptionEnum::Three);
9494

95-
let res = Thread::scoped(move || {
95+
let res = thread::spawn(move || {
9696
let mut s = State::new();
9797
s.checkoption(1, None, &lst);
9898
}).join();
9999
assert!(res.is_err(), "expected error from checkoption");
100100

101-
let res = Thread::scoped(move || {
101+
let res = thread::spawn(move || {
102102
let mut s = State::new();
103103
s.checkoption(1, Some("four"), &lst);
104104
}).join();

0 commit comments

Comments
 (0)