Skip to content

use self; gets entirely deleted #6558

Closed
@emilyyyylime

Description

@emilyyyylime

before:

// hi
use me; // me
use self; // self
use this; // this
// bye

after:

// hi
 // self
use me; // me
use this; // this
// bye

use self; is indeed invalid but I think it's more useful for users to see the rustc error (self imports are only allowed within a { } list) than for the line to be entirely deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-imports`use` syntaxbugPanic, non-idempotency, invalid code, etc.p-low

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions