(require 'compile) (defun bug-36001-reproducer () (interactive) (with-current-buffer (get-buffer-create "*test bug 36001*") (compilation-mode) (display-buffer (current-buffer)) (mapc (lambda (s) (let ((inhibit-read-only t)) (insert s)) (sit-for 0)) '(" Compiling rust_swig v0.4.0-pre (/home/evgeniy/bigdisk1/projects/rust-infra/swig/macroslib) " "error[E0599]: no method named `merge` found for type `typemap::TypeMap` in the current scope " " --> macroslib/src/lib.rs:428:27 | 428 | self.conv_map.merge(*code_id, code, target_pointer_width)?; | ^^^^^ help: did you mean: `merge2` | ::: macroslib/src/typemap.rs:81:1 | 81 | pub(crate) struct TypeMap { | ------------------------- method `merge` not found for this ")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Copied from https://github.com/rust-lang/rust-mode/raw/master/rust-mode.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar rustc-compilation-regexps (let ((file "\\([^\n]+\\)") (start-line "\\([0-9]+\\)") (start-col "\\([0-9]+\\)")) (let ((re (concat "^\\(?:error\\|\\(warning\\)\\)[^-]+--> \\(" file ":" start-line ":" start-col "\\)"))) (cons re '(3 4 5 (1) 2)))) "Specifications for matching errors in rustc invocations. See `compilation-error-regexp-alist' for help on their format.") (defvar rustc-colon-compilation-regexps (let ((file "\\([^\n]+\\)") (start-line "\\([0-9]+\\)") (start-col "\\([0-9]+\\)")) (let ((re (concat "^ *::: " file ":" start-line ":" start-col ; ::: foo/bar.rs ))) (cons re '(1 2 3 0)))) ;; 0 for info type "Specifications for matching `:::` hints in rustc invocations. See `compilation-error-regexp-alist' for help on their format.") ;; Match test run failures and panics during compilation as ;; compilation warnings (defvar cargo-compilation-regexps '("^\\s-+thread '[^']+' panicked at \\('[^']+', \\([^:]+\\):\\([0-9]+\\)\\)" 2 3 nil nil 1) "Specifications for matching panics in cargo test invocations. See `compilation-error-regexp-alist' for help on their format.") (progn (add-to-list 'compilation-error-regexp-alist-alist (cons 'rustc rustc-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist 'rustc) (add-to-list 'compilation-error-regexp-alist-alist (cons 'rustc-colon rustc-colon-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist 'rustc-colon) (add-to-list 'compilation-error-regexp-alist-alist (cons 'cargo cargo-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist 'cargo) (add-hook 'next-error-hook 'rustc-scroll-down-after-next-error))