Skip to content

disallowed_methods on trait impls #8581

@Jarcho

Description

@Jarcho

Description

It should be possible to to specify a specific impl of a trait method (e.g. <alloc::vec::Vec as core::iter::IntoIterator>::into_iter) to be disallowed, rather than having to disallow the trait method for all impls. Two things will need to be done to fix this:

  • clippy.toml syntax will need to be extended.
  • The DefId for the trait method will need to be resolved to it's impl's DefId, if possible (generic code will need something more creative here as it could be calling <T as IntoIterator>::into_iter).

@rustbot label +E-medium
@rustbot label +C-enhancement

Metadata

Metadata

Assignees

Labels

C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions