Fit new rust nightly. Update dependencies.

toolchain_update
WangRunji 7 years ago
parent 932e2fc290
commit f707d7e757

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

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

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

Loading…
Cancel
Save