Skip to content

Lint to ban impl Trait in parameters #10030

Closed
@SUPERCILEX

Description

@SUPERCILEX

Advantage

You can't use the turbofish with parameter impls which makes it strictly less powerful as far as I can tell. This lint should only apply to public items.

Name: impl_trait_in_param_of_pub_fn.

Category

style (or potentially pedantic)

Example

fn foo(t: impl Trait) {}

Could be written as:

fn foo<T: Trait>(t: T) {}

Metadata

Metadata

Assignees

Labels

A-lintArea: New lints

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions