Skip to content

Suspicious state from syntax checker rust-cargo: Flycheck checker rust-cargo returned 101, but its output contained no errors: error: no library targets found in package ... #92

Description

@arcimboldo

Hi, I installed flycheck from elpa, I am running emacs from ubuntu 25.04.

I just created a crate and opened the main.rs with emacs and I get:

Suspicious state from syntax checker rust-cargo: Flycheck checker rust-cargo returned 101, but its output contained no errors: error: no library targets found in package `hw_cargo`

Try installing a more recent version of rust-cargo, and please open a bug report if the issue persists in the latest release.  Thanks!
Type q in help window to delete it

Output of flycheck-verify-setup:

Syntax checkers for buffer main.rs in rust-mode:

First checker to run:

  rust-cargo
    - may enable:  yes
    - may run:     t
    - executable:  Found at /usr/bin/cargo
    - Cargo.toml:  Found
    - Crate type:  lib
    - Binary name: Not required

Checkers that could run if selected:

  rust  select
    - may enable: yes
    - may run:    t
    - executable: Found at /usr/bin/rustc

  rust-clippy  select
    - may enable: yes
    - may run:    t
    - executable: Found at /usr/bin/cargo
    - Clippy:     Found
    - Cargo.toml: Found

Flycheck Mode is enabled.  Use C-u C-c ! x to enable disabled
checkers.

--------------------

Flycheck version: nil
Emacs version:    30.1
System:           x86_64-pc-linux-gnu
Window system:    x

Versions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions