Skip to content

Commit 2a5caea

Browse files
authored
Merge pull request #2872 from dtolnay/ehpersonality
Drop #[lang = "eh_personality"] from no-std test
2 parents 8478a3b + b9f93f9 commit 2a5caea

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
toolchain: ${{matrix.rust}}
5353
- run: cd serde && cargo build --features rc
5454
- run: cd serde && cargo build --no-default-features
55+
- run: cd test_suite/no_std && cargo build
5556

5657
nightly:
5758
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}

test_suite/no_std/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ libc = { version = "0.2", default-features = false }
1010
serde = { path = "../../serde", default-features = false }
1111
serde_derive = { path = "../../serde_derive" }
1212

13+
[profile.dev]
14+
panic = "abort"
15+
16+
[profile.release]
17+
panic = "abort"
18+
1319
[workspace]

test_suite/no_std/src/main.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(internal_features)]
2-
#![feature(lang_items)]
31
#![no_std]
42
#![no_main]
53

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

13-
#[lang = "eh_personality"]
14-
#[no_mangle]
15-
pub extern "C" fn rust_eh_personality() {}
16-
1711
#[panic_handler]
1812
fn panic(_info: &core::panic::PanicInfo) -> ! {
1913
unsafe {

0 commit comments

Comments
 (0)