Hello !
I am trying to follow phil's tutorial on making an OS in rust.
This will not be my first one but it will be the first one I made in rust.
The problem is that VScode (my IDE) say
when I'm trying to redefine the panic_handler (witch I must do since I can't use the std library)
This must be a error from the language checker since the program compile very well.
I use the rust-analyser
module from VScode.
I'm on windows 64bit, and I use the nightly release of rust.
I tried using this .vscode/settings.json file:
{
"rust.all_targets": false,
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target",
"thumbv7m-none-eabi"
],
"rust-analyzer.checkOnSave.overrideCommand": [
"./cargo",
"xcheck",
"--json-output"
]
}
The commands I use to build the project (just as stated in the tutoriel)
cargo build --target thumbv7em-none-eabihf
My program (in case, we never know, but it's the same as the tutoriel)
#![no_std]
#![no_main]
use core::panic::PanicInfo;
/// This function is called on panic.
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
#[no_mangle]
pub extern "C" fn _start() -> ! {
loop {}
}
Lastly, I don't know if it is useful, but the result of the rustc --version --verbose
command :
rustc 1.48.0-nightly (8876ffc92 2020-10-02)
binary: rustc
commit-hash: 8876ffc9235dade728e1fbc4be4c85415fdd0bcd
commit-date: 2020-10-02
host: x86_64-pc-windows-msvc
release: 1.48.0-nightly
LLVM version: 11.0
How can I correct this please ?
PS: This is my first post, let me know if I miss anything.