diff options
| author | Aleksei Gusev <aleksei.gusev@gmail.com> | 2025-06-08 23:49:40 +0300 |
|---|---|---|
| committer | Aleksei Gusev <aleksei.gusev@gmail.com> | 2025-06-09 15:43:06 +0300 |
| commit | 684f67938c7f7e8c0f3cee638f03f2603e0e1e3f (patch) | |
| tree | 81c2dd704c45c75162e6fab684129c18fde03847 /rust-mode-tests.el | |
| parent | 25d91cff281909e9b7cb84e31211c4e7b0480f94 (diff) | |
| download | rust-mode-684f67938c7f7e8c0f3cee638f03f2603e0e1e3f.tar.gz | |
Add compilation regexp to match ‘dbg!’ output
While debugging tests it’s annoying when ‘compilation-mode’ matches
‘dbg!’ output incorrectly. Currently, rust-mode’s regexps assign it as
an error and incorrectly include ‘[’. The proposed change adds a
regexp to match such things and assign them info level.
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index a0ee0bb..56d759c 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -3693,6 +3693,7 @@ let b = 1;" (insert "note: `ZZZ` could also refer to the constant imported here -> b\n --> file4.rs:12:34\n\n") (insert " ::: file5.rs:12:34\n\n") (insert "thread 'main' panicked at src/file7.rs:12:34:\n\n") + (insert "[src/file8.rs:159:5] symbol_value(SOME_VAR) = Some(\n\n") ;; should not match (insert "werror found a -> b\n --> no_match.rs:12:34\n\n") (insert "error[E0061]: this function takes 1 parameter but 2 parameters were supplied\n --> file6.rs:132:34 @@ -3712,12 +3713,14 @@ let b = 1;" (("file5.rs" "12" "34" compilation-info "file5.rs:12:34")) ((like-previous-one "82" back-to-indentation compilation-info "82") (like-previous-one "132" back-to-indentation compilation-info "132")) - (("src/file7.rs" "12" "34" nil "src/file7.rs:12:34"))) + (("src/file7.rs" "12" "34" nil "src/file7.rs:12:34")) + (("src/file8.rs" "159" "5" compilation-info "src/file8.rs:159:5"))) (mapcar #'rust-collect-matches (list rustc-compilation-regexps rustc-colon-compilation-regexps rustc-refs-compilation-regexps - rustc-panics-compilation-regexps)))))) + rustc-panics-compilation-regexps + rustc-dbg!-compilation-regexps)))))) ;; If electric-pair-mode is available, load it and run the tests that use it. If not, ;; no error--the tests will be skipped. |
