about summary refs log tree commit diff
path: root/tests/ui/panics/result-get-panic.rs
blob: b8dc49f9acaa506008170d2941d91a987b3a4096 (plain)
1
2
3
4
5
6
7
8
9
//@ run-fail
//@ error-pattern:called `Result::unwrap()` on an `Err` value
//@ needs-subprocess

use std::result::Result::Err;

fn main() {
    println!("{}", Err::<isize, String>("kitty".to_string()).unwrap());
}