]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / rfc-1937-termination-trait / termination-trait-in-test-should-panic.rs
1 // compile-flags: --test
2
3 #![feature(test)]
4
5 extern crate test;
6 use std::num::ParseIntError;
7 use test::Bencher;
8
9 #[test]
10 #[should_panic]
11 fn not_a_num() -> Result<(), ParseIntError> {
12     //~^ ERROR functions using `#[should_panic]` must return `()`
13     let _: u32 = "abc".parse()?;
14     Ok(())
15 }