diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/panic_in_result_fn.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/panic_in_result_fn.rs b/tests/ui/panic_in_result_fn.rs index aaaf9a109ac..e2375aa996f 100644 --- a/tests/ui/panic_in_result_fn.rs +++ b/tests/ui/panic_in_result_fn.rs @@ -71,6 +71,15 @@ fn function_result_with_custom_todo() -> Result<bool, String> // should not emit Ok(true) } +fn issue_13381<const N: usize>() -> Result<(), String> { + const { + if N == 0 { + panic!(); + } + } + Ok(()) +} + fn main() -> Result<(), String> { todo!("finish main method"); Ok(()) |
