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:
linfeng
2024-11-25 16:28:05 +08:00
committed by GitHub
parent 23ccf763b6
commit 539ee3eaeb
15 changed files with 119 additions and 126 deletions

View File

@ -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" }

View File

@ -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;