Skip to content

"warning[...]: ..." style compile messages not recognized #121

@ensc

Description

@ensc

Recent cargo clippy generates warnings like

warning[E0133]: call to unsafe function `....` is unsafe and requires unsafe block
  --> src/device.rs:43:2

rustic expects only warning: but not the tagged warning[E0133]:

rustic/rustic-compile.el

Lines 138 to 145 in e77f62f

(defvar rustic-compilation-warning
(let ((warning "^warning:[^\n]*\n\s*-->\s")
(file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
(start-col "\\([0-9]+\\)"))
(let ((re (concat warning file ":" start-line ":" start-col)))
(cons re '(1 2 3 1)))) ;; 1 for warning
"Create hyperlink in compilation buffers for rust warnings.")

and does not detect this as an actionable line. Regex should be changed to

  (let ((warning "^warning[^:]*:[^\n]*\n\s*-->\s")

(like for error)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions