Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index eb997e6fef..5cab017a58 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -4913,6 +4913,22 @@ fn foo() -> NotResult<(), Short> { ``` "#]], ); + check_hover_range( + r#" +//- minicore: try +use core::ops::ControlFlow; +fn foo() -> ControlFlow<()> { + $0ControlFlow::Break(())?$0; + ControlFlow::Continue(()) +} +"#, + expect![[r#" + ```text + Try Target Type: ControlFlow<(), {unknown}> + Propagated as: ControlFlow<(), ()> + ``` + "#]], + ); } #[test] @@ -4928,9 +4944,9 @@ fn foo() -> Option<()> { } "#, expect![[r#" - ```rust - <Option<i32> as Try>::Output - ```"#]], + ```rust + i32 + ```"#]], ); } |