Skip to content

use normalization can break self imports #3568

Description

@jrobsonchase

There are rare cases where normalizing a use a::b::{self}; into use a::b; will break things. Specifically, cases in which b already exists as a function or macro in the current namespace, and you only want to import it as a module.

Playground example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=12f1d13256258ac8b34d06b9592a86ef

Running rustfmt on this will cause it to no longer compile.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEP-highHigh priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions