-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Steps
git clone https://gitlab.torproject.org/Diziet/rust-derive-deftly -b derive-deftly-1.2.0
cd rust-derive-deftly
cargo +beta clippy -p derive-deftly-macros --all-features
The code contains this, where Void
is from void
:
pub struct MetaUnsupported(Void);
Expected behaviour
It lints without complaint.
Actual behaviour
warning: struct `MetaUnsupported` is never constructed
--> macros/meta.rs:746:12
|
746 | pub struct MetaUnsupported(Void);
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Discussion
I don't think it ever makes sense to warn that an uninhabited type is never constructed. That is normal. Presumably the uninhabited type has some function in the code, or might become inhabited with a different configuration.
Version it worked on
It works on 1.88.0.
Version with regression
rustc --version --verbose
:
rustc 1.90.0-beta.3 (630a5f1d3 2025-08-16)
binary: rustc
commit-hash: 630a5f1d3cda0e54d878f3f6bf9be435ee4c68a5
commit-date: 2025-08-16
host: x86_64-unknown-linux-gnu
release: 1.90.0-beta.3
LLVM version: 20.1.8
@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
@rustbot modify labels: +A-diagnostics
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.S-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.