Skip to content

No warning for unused thread_local #111288

Open
@juchiast

Description

@juchiast

I tried this code:

thread_local! {
    static LOCAL: String = String::new();
}

fn main() {}

I expected to see this happen: rust outputs warning for unused static LOCAL.

Instead, this happened: no warning

Meta

Rust version: current stable (1.69.0), beta, and nightly

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions