Skip to content

unnecessary_debug_formatting does not respect MSRV #14952

@lopopolo

Description

@lopopolo

Summary

I have a crate with MSRV 1.76.0 which is triggering unnecessary_debug_formatting when using debug formatting on a Path and OsStr. This lint should not fire since the display methods were not stabilized until Rust 1.87.0.

Reproducer

I tried this code:

<code>

I expected to see this happen:

Instead, this happened:

Version


Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions