From b44573743ed9146aea0470910ee073792ab46e66 Mon Sep 17 00:00:00 2001 From: Nathan Moreau Date: Tue, 18 Dec 2018 02:40:50 +0100 Subject: imenu: handle lifetimes in impl blocks. --- rust-mode-tests.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'rust-mode-tests.el') diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 64d65c4..9d87960 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -3061,6 +3061,20 @@ extern \"rust-intrinsic\" fn five() { "four" "five")))) +(ert-deftest rust-test-imenu-impl-with-lifetime () + (test-imenu + " +impl<'a> One<'a> { + fn one() {} +} + +impl Two<'a> { + fn two() {} +} +" + '(("Impl" "One" "Two") + ("Fn" "one" "two")))) + (when (executable-find rust-cargo-bin) (ert-deftest rust-test-project-located () (lexical-let* ((test-dir (expand-file-name "test-project" default-directory)) -- cgit v1.2.3