summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs
blob: 96808a3ed914f40173811305611cbd7b0961bad5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// compile-flags: --test

#![feature(test)]

extern crate test;
use std::num::ParseIntError;
use test::Bencher;

#[test]
#[should_panic]
fn not_a_num() -> Result<(), ParseIntError> {
    //~^ ERROR functions using `#[should_panic]` must return `()`
    let _: u32 = "abc".parse()?;
    Ok(())
}