Remove eh_unwind_resume lang item

This commit is contained in:
Amanieu d'Antras 2020-01-27 06:10:10 +00:00
parent d73813ae62
commit f4f91f0b2f
24 changed files with 34 additions and 140 deletions

View file

@ -11,5 +11,3 @@ use core::panic::PanicInfo;
fn panic_impl(info: &PanicInfo) -> ! { loop {} }
#[lang = "eh_personality"]
fn eh_personality() {}
#[lang = "eh_unwind_resume"]
fn eh_unwind_resume() {}

View file

@ -17,8 +17,6 @@ const X: () = unimplemented!();
#[lang = "eh_personality"]
fn eh() {}
#[lang = "eh_unwind_resume"]
fn eh_unwind_resume() {}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {

View file

@ -1,41 +1,41 @@
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:21:23
--> $DIR/macro-comma-behavior.rs:20:23
|
LL | assert_eq!(1, 1, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:24:23
--> $DIR/macro-comma-behavior.rs:23:23
|
LL | assert_ne!(1, 2, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:30:29
--> $DIR/macro-comma-behavior.rs:29:29
|
LL | debug_assert_eq!(1, 1, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:33:29
--> $DIR/macro-comma-behavior.rs:32:29
|
LL | debug_assert_ne!(1, 2, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:54:19
--> $DIR/macro-comma-behavior.rs:53:19
|
LL | format_args!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:72:21
--> $DIR/macro-comma-behavior.rs:71:21
|
LL | unimplemented!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:81:24
--> $DIR/macro-comma-behavior.rs:80:24
|
LL | write!(f, "{}",)?;
| ^^

View file

@ -9,7 +9,6 @@
#[cfg(std)] use std::fmt;
#[cfg(core)] use core::fmt;
#[cfg(core)] #[lang = "eh_personality"] fn eh_personality() {}
#[cfg(core)] #[lang = "eh_unwind_resume"] fn eh_unwind_resume() {}
#[cfg(core)] #[lang = "panic_impl"] fn panic_impl(panic: &core::panic::PanicInfo) -> ! { loop {} }
// (see documentation of the similarly-named test in run-pass)

View file

@ -1,59 +1,59 @@
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:21:23
--> $DIR/macro-comma-behavior.rs:20:23
|
LL | assert_eq!(1, 1, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:24:23
--> $DIR/macro-comma-behavior.rs:23:23
|
LL | assert_ne!(1, 2, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:30:29
--> $DIR/macro-comma-behavior.rs:29:29
|
LL | debug_assert_eq!(1, 1, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:33:29
--> $DIR/macro-comma-behavior.rs:32:29
|
LL | debug_assert_ne!(1, 2, "{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:38:18
--> $DIR/macro-comma-behavior.rs:37:18
|
LL | eprint!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:50:18
--> $DIR/macro-comma-behavior.rs:49:18
|
LL | format!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:54:19
--> $DIR/macro-comma-behavior.rs:53:19
|
LL | format_args!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:61:17
--> $DIR/macro-comma-behavior.rs:60:17
|
LL | print!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:72:21
--> $DIR/macro-comma-behavior.rs:71:21
|
LL | unimplemented!("{}",);
| ^^
error: 1 positional argument in format string, but no arguments were given
--> $DIR/macro-comma-behavior.rs:81:24
--> $DIR/macro-comma-behavior.rs:80:24
|
LL | write!(f, "{}",)?;
| ^^

View file

@ -12,5 +12,4 @@ fn main() {
}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "eh_unwind_resume"] extern fn eh_unwind_resume() {}
#[lang = "panic_impl"] fn panic_impl(panic: &PanicInfo) -> ! { loop {} }

View file

@ -11,5 +11,3 @@ use core::panic::PanicInfo;
fn panic_impl(info: &PanicInfo) -> ! { loop {} }
#[lang = "eh_personality"]
fn eh_personality() {}
#[lang = "eh_unwind_resume"]
fn eh_unwind_resume() {}

View file

@ -15,10 +15,6 @@ use core::ops::RangeBounds;
#[lang = "eh_personality"]
extern fn eh_personality() {}
#[cfg(target_os = "windows")]
#[lang = "eh_unwind_resume"]
extern fn eh_unwind_resume() {}
// take a reference to any built-in range
fn take_range(_r: &impl RangeBounds<i8>) {}

View file

@ -1,7 +1,7 @@
error: `#[panic_handler]` function required, but not found
error[E0308]: mismatched types
--> $DIR/issue-54505-no-std.rs:28:16
--> $DIR/issue-54505-no-std.rs:24:16
|
LL | take_range(0..1);
| ^^^^
@ -13,7 +13,7 @@ LL | take_range(0..1);
found struct `core::ops::Range<{integer}>`
error[E0308]: mismatched types
--> $DIR/issue-54505-no-std.rs:33:16
--> $DIR/issue-54505-no-std.rs:29:16
|
LL | take_range(1..);
| ^^^
@ -25,7 +25,7 @@ LL | take_range(1..);
found struct `core::ops::RangeFrom<{integer}>`
error[E0308]: mismatched types
--> $DIR/issue-54505-no-std.rs:38:16
--> $DIR/issue-54505-no-std.rs:34:16
|
LL | take_range(..);
| ^^
@ -37,7 +37,7 @@ LL | take_range(..);
found struct `core::ops::RangeFull`
error[E0308]: mismatched types
--> $DIR/issue-54505-no-std.rs:43:16
--> $DIR/issue-54505-no-std.rs:39:16
|
LL | take_range(0..=1);
| ^^^^^
@ -49,7 +49,7 @@ LL | take_range(0..=1);
found struct `core::ops::RangeInclusive<{integer}>`
error[E0308]: mismatched types
--> $DIR/issue-54505-no-std.rs:48:16
--> $DIR/issue-54505-no-std.rs:44:16
|
LL | take_range(..5);
| ^^^
@ -61,7 +61,7 @@ LL | take_range(..5);
found struct `core::ops::RangeTo<{integer}>`
error[E0308]: mismatched types
--> $DIR/issue-54505-no-std.rs:53:16
--> $DIR/issue-54505-no-std.rs:49:16
|
LL | take_range(..=42);
| ^^^^^