Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy error in test_result.rs #231

Closed
armandas opened this issue Aug 25, 2024 · 5 comments
Closed

Clippy error in test_result.rs #231

armandas opened this issue Aug 25, 2024 · 5 comments

Comments

@armandas
Copy link

When I run clippy on my project, I get the following error:

error[E0308]: mismatched types
   --> /home/armandas/.rustup/toolchains/esp/lib/rustlib/src/rust/library/test/src/test_result.rs:102:18
    |
101 |         None => match status.signal() {
    |                       --------------- this expression has type `Option<i32>`
102 |             Some(libc::SIGABRT) => TestResult::TrFailed,
    |                  ^^^^^^^^^^^^^ expected `i32`, found `usize`

Meta

rustc --version --verbose:

rustc 1.80.0-nightly (1b259e0b8 2024-07-22) (1.80.0.0)
binary: rustc
commit-hash: 1b259e0b8b2129dd3d62819a32f6d9b287e6b86c
commit-date: 2024-07-22
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 17.0.1

@esp-rs esp-rs deleted a comment Aug 25, 2024
@esp-rs esp-rs deleted a comment Aug 25, 2024
@cs-clarence
Copy link

i have this issue too

1 similar comment
@gentean
Copy link

gentean commented Oct 23, 2024

i have this issue too

@MabezDev
Copy link
Member

Does this still occur on the latest 1.82 toolchain?

@MabezDev
Copy link
Member

If someone could set up a min repro for me, that would be most useful.

@armandas
Copy link
Author

@MabezDev

I was trying to reproduce it on the esp-idf-template, but could not. After checking the differences between my project and the template, I found the lines below. The change was added in May (PR: esp-rs/esp-idf-template#212) and fixes the issue:

[[bin]]
name = "project-name"
harness = false # do not use the built in cargo test harness -> resolve rust-analyzer errors

As such, it's probably OK to close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants
@armandas @MabezDev @gentean @cs-clarence and others