1
0
Fork 0

Rust updates

This commit is contained in:
edef 2015-01-09 22:45:39 +01:00
parent fbd37bf96b
commit fec3f2eaef
4 changed files with 6 additions and 7 deletions

View File

@ -6,7 +6,7 @@ use alloc::boxed::Box;
use fn_box::FnBox; use fn_box::FnBox;
use stack::Stack; use stack::Stack;
use arch::{mod, Registers}; use arch::{self, Registers};
pub struct Context { pub struct Context {
regs: Registers, regs: Registers,

View File

@ -1,7 +1,7 @@
#![feature(default_type_params, macro_rules, phase, globs, asm)] #![feature(phase, asm)]
#![no_std] #![no_std]
#[phase(plugin, link)] #[macro_use]
extern crate core; extern crate core;
extern crate alloc; extern crate alloc;
extern crate fn_box; extern crate fn_box;
@ -10,7 +10,7 @@ pub use context::Context;
mod std { pub use core::fmt; } mod std { pub use core::fmt; }
#[macro_escape] #[macro_use]
mod macros; mod macros;
mod context; mod context;

View File

@ -1,4 +1,3 @@
#![feature(unboxed_closures, default_type_params)]
extern crate lwkt; extern crate lwkt;
extern crate fn_box; extern crate fn_box;
@ -14,7 +13,7 @@ fn main() {
let mut native = unsafe { Context::native() }; let mut native = unsafe { Context::native() };
fn init(ctx: *mut (*mut Context, *mut Context), f: Box<FnBox()>) -> ! { fn init(ctx: *mut (*mut Context, *mut Context), f: Box<FnBox<(), ()>>) -> ! {
unsafe { unsafe {
let (native, green) = *ctx; let (native, green) = *ctx;

View File

@ -1,6 +1,6 @@
extern crate libc; extern crate libc;
extern crate std; extern crate std;
use self::std::prelude::*; use self::std::prelude::v1::*;
use self::std::os::{errno, page_size, MemoryMap}; use self::std::os::{errno, page_size, MemoryMap};
use self::std::os::MapOption::{MapReadable, MapWritable, MapNonStandardFlags}; use self::std::os::MapOption::{MapReadable, MapWritable, MapNonStandardFlags};