1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

Fit new rust nightly. Update dependencies.

This commit is contained in:
WangRunji 2018-06-19 23:43:40 +08:00
parent 932e2fc290
commit f707d7e757
3 changed files with 19 additions and 11 deletions

View File

@ -20,18 +20,17 @@ opt-level = 1
debug = true
[dependencies]
bit_field = "0.7.0"
bit_field = "0.9.0"
rlibc = "1.0"
volatile = "0.1.0"
spin = "0.4.5"
multiboot2 = "0.5"
spin = "0.4.8"
multiboot2 = "0.6"
bitflags = "1.0"
x86_64 = "0.2.3"
x86_64 = "0.2.6"
once = "0.3.3"
linked_list_allocator = "0.5.0"
linked_list_allocator = "0.6"
redox_syscall = "0.1"
xmas-elf = "0.6"
arrayvec = { version = "0.4.7", default-features = false }
log = "0.4"
lazy_static = { version = "1.0.0", features = ["spin_no_std"] }
simple-filesystem = { git = "https://github.com/wangrunji0408/SimpleFileSystem-Rust" }

View File

@ -1,19 +1,27 @@
// Rust language features implementions
use core;
use core::panic::PanicInfo;
use arch::cpu;
#[lang = "eh_personality"]
extern fn eh_personality() {
}
#[lang = "panic_fmt"]
#[panic_implementation]
#[no_mangle]
pub extern fn panic_fmt(fmt: core::fmt::Arguments, file: &'static str, line: u32) -> ! {
error!("\n\nPANIC in {} at line {}\n {}", file, line, fmt);
pub fn panic(info: &PanicInfo) -> ! {
let location = info.location().unwrap();
let message = info.message().unwrap();
error!("\n\nPANIC in {} at line {}\n {}", location.file(), location.line(), message);
if cfg!(feature = "qemu_auto_exit") {
unsafe{ cpu::exit_in_qemu(3) }
} else {
loop { }
}
}
#[lang = "oom"]
#[no_mangle]
fn oom() -> ! {
panic!("out of memory");
}

View File

@ -12,12 +12,13 @@
#![feature(naked_functions)]
#![feature(asm)]
#![feature(optin_builtin_traits)]
#![feature(panic_implementation)]
#![feature(panic_info_message)]
#![no_std]
#[macro_use]
extern crate alloc;
extern crate arrayvec;
extern crate bit_allocator;
extern crate bit_field;
#[macro_use]