Skip to content

http::HeaderName interacts poorly with declare_interior_mutable_const #9776

Closed
@lucacasonato

Description

@lucacasonato

Summary

The reproducer code emits a declare_interior_mutable_const warning, even though HeaderName is not interior mutable AFAICT.

Lint Name

declare_interior_mutable_const

Reproducer

use http::HeaderName;

const X_FOO_BAR: HeaderName = HeaderName::from_static("x-foo-bar");

Version

rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: aarch64-apple-darwin
release: 1.64.0
LLVM version: 14.0.6

Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions