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.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 60708cb42e..ca6c169348 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -301,6 +301,33 @@ fn main() {
* `(*x.f2.0.0).f` by mutable borrow
"#]],
);
+ check(
+ r#"
+//- minicore: copy, option
+
+fn do_char(c: char) {}
+
+fn main() {
+ let x = None;
+ let y = |$0| {
+ match x {
+ Some(c) => do_char(c),
+ None => x = None,
+ }
+ };
+}
+"#,
+ expect![[r#"
+ *|*
+ ```rust
+ {closure#0} // size = 8, align = 8
+ impl FnMut()
+ ```
+
+ ## Captures
+ * `x` by mutable borrow
+ "#]],
+ );
}
#[test]