mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
fix(backtrace):Use more reasonable compile options (#1056)
* fix(backtrace):Use more reasonable compile options * 调整代码,同时解决rust analyzer未能提示warning的问题 --------- Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -11,4 +11,4 @@ path = "src/main.rs"
|
||||
[dependencies]
|
||||
unified-init-macros = { path = "macros" }
|
||||
linkme = "=0.3.27"
|
||||
system_error = { path = "../system_error" }
|
||||
system_error = { path = "../system_error" }
|
||||
|
@ -2,6 +2,8 @@
|
||||
//! 然后在当前目录执行 `cargo expand --bin unified-init-expand`
|
||||
//! 就可以看到把proc macro展开后的代码了
|
||||
#![no_std]
|
||||
#![allow(internal_features)]
|
||||
#![feature(lang_items)]
|
||||
|
||||
fn main() {
|
||||
todo!()
|
||||
@ -14,6 +16,10 @@ pub fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "none")]
|
||||
#[lang = "eh_personality"]
|
||||
unsafe extern "C" fn eh_personality() {}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use system_error::SystemError;
|
||||
|
Reference in New Issue
Block a user