Rust updates
This commit is contained in:
parent
fbd37bf96b
commit
fec3f2eaef
|
@ -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,
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue