summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorNathan Moreau <nathan.moreau@m4x.org>2019-12-08 17:54:25 +0100
committerGitHub <noreply@github.com>2019-12-08 17:54:25 +0100
commitd0f3f45cc4fe1c5b72466253f051294d275a4b64 (patch)
treeaea4605a18b2ff3d24c774e61d410b57356d8a99 /rust-mode-tests.el
parent4c8754b249f96455facf81fd5d5b2d06d0cd9b79 (diff)
downloadrust-mode-d0f3f45cc4fe1c5b72466253f051294d275a4b64.tar.gz
imenu: fn items: match async/const and all pub variants. (#346)
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el49
1 files changed, 39 insertions, 10 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index e2e1218..b680548 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -3078,29 +3078,58 @@ type Foo<T> where T: Copy = Box<T>;
(ert-deftest rust-test-imenu-extern-unsafe-fn ()
(test-imenu
"
-fn one() {
+fn f1() {
}
-unsafe fn two() {
+unsafe fn f2() {
}
-extern \"C\" fn three() {
+extern \"C\" fn f3() {
}
-pub extern fn four() {
+pub extern fn f4() {
+}
+
+extern \"rust-intrinsic\" fn f5() {
+}
+
+async fn f6() {
+}
+
+const fn f7() {
+}
+async const fn not_a_match() {
}
-extern \"rust-intrinsic\" fn five() {
+fn f8<'a>() {
+}
+
+pub ( in self::super ) fn f9() {
+}
+
+pub ( in super ) fn f10() {
+}
+
+pub(in crate) fn f11() {
+}
+pub (in self) fn f12() {
}
"
'(("Fn"
- "one"
- "two"
- "three"
- "four"
- "five"))))
+ "f1"
+ "f2"
+ "f3"
+ "f4"
+ "f5"
+ "f6"
+ "f7"
+ "f8"
+ "f9"
+ "f10"
+ "f11"
+ "f12"))))
(ert-deftest rust-test-imenu-impl-with-lifetime ()
(test-imenu