diff options
| author | bors <bors@rust-lang.org> | 2020-01-24 21:42:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-24 21:42:46 +0000 |
| commit | 1ccd284ec645c65e487ae610d91c1943e2a17c6c (patch) | |
| tree | 796f49a910b1f5ae481b5561723d45e29361b8c3 /tests | |
| parent | c48594c6945b37ecffb5608fca617c3a16d4715f (diff) | |
| parent | 634774b89b446945d62572e86c6d29f2dacc8c76 (diff) | |
| download | rust-1ccd284ec645c65e487ae610d91c1943e2a17c6c.tar.gz rust-1ccd284ec645c65e487ae610d91c1943e2a17c6c.zip | |
Auto merge of #5086 - Areredify:issue-3746, r=phansch
don't fire `empty_loop` in `no_std` crates closes #3746. changelog: move no_std detection to utils, don't fire empty_loop in no_std crates
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/issue-3746.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/issue-3746.rs b/tests/ui/issue-3746.rs new file mode 100644 index 00000000000..879d1d5d916 --- /dev/null +++ b/tests/ui/issue-3746.rs @@ -0,0 +1,22 @@ +// ignore-macos +// ignore-windows + +#![warn(clippy::empty_loop)] +#![feature(lang_items, link_args, start, libc)] +#![link_args = "-nostartfiles"] +#![no_std] + +use core::panic::PanicInfo; + +#[start] +fn main(argc: isize, argv: *const *const u8) -> isize { + loop {} +} + +#[panic_handler] +fn panic(_info: &PanicInfo) -> ! { + loop {} +} + +#[lang = "eh_personality"] +extern "C" fn eh_personality() {} |
