Skip to content

use_crate_prefix_for_self_imports #13645

@lengyijun

Description

@lengyijun

What it does

Items imported from current crate should be prefixed with crate::

Advantage

  • distinguish from dependencies
  • Maintain consistent coding style

Different import styles could exist at same time:

use crate::foo::qux;
use foo::bar;

Drawbacks

None

Example

use foo::bar;

Could be written as:

use crate::foo::bar;

Metadata

Metadata

Assignees

No one assigned

    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