Skip to content

Commit

Permalink
Merge pull request #2872 from dtolnay/ehpersonality
Browse files Browse the repository at this point in the history
Drop #[lang = "eh_personality"] from no-std test
  • Loading branch information
dtolnay authored Dec 20, 2024
2 parents 8478a3b + b9f93f9 commit 2a5caea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
toolchain: ${{matrix.rust}}
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd test_suite/no_std && cargo build

nightly:
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
Expand Down
6 changes: 6 additions & 0 deletions test_suite/no_std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ libc = { version = "0.2", default-features = false }
serde = { path = "../../serde", default-features = false }
serde_derive = { path = "../../serde_derive" }

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

[workspace]
6 changes: 0 additions & 6 deletions test_suite/no_std/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(internal_features)]
#![feature(lang_items)]
#![no_std]
#![no_main]

Expand All @@ -10,10 +8,6 @@ extern "C" fn main(_argc: c_int, _argv: *const *const u8) -> c_int {
0
}

#[lang = "eh_personality"]
#[no_mangle]
pub extern "C" fn rust_eh_personality() {}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
unsafe {
Expand Down

0 comments on commit 2a5caea

Please sign in to comment.