summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-7410.rs
blob: 85fa421032191505e9d76edd1cb2111d9c4bbce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// compile-flags: -Clink-arg=-nostartfiles
// ignore-macos
// ignore-windows

#![feature(lang_items, start, libc)]
#![no_std]
#![allow(clippy::if_same_then_else)]
#![allow(clippy::redundant_pattern_matching)]

use core::panic::PanicInfo;

struct S;

impl Drop for S {
    fn drop(&mut self) {}
}

#[start]
fn main(argc: isize, argv: *const *const u8) -> isize {
    if let Some(_) = Some(S) {
    } else {
    }
    0
}

#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
    loop {}
}

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