Skip to content

fix: incorrect parsing of dep::{foo, bar}#5420

Closed
asterite wants to merge 1 commit intomasterfrom
ab/parse-use-dep-tree
Closed

fix: incorrect parsing of dep::{foo, bar}#5420
asterite wants to merge 1 commit intomasterfrom
ab/parse-use-dep-tree

Conversation

@asterite
Copy link
Collaborator

@asterite asterite commented Jul 5, 2024

Description

Problem

Resolves #5299

Summary

It seems that for an empty path, dep was parsed as a plain path (so the bug wasn't just formatting, it was incorrectly interpreting the import).

I do wonder if the existing code was like that so that use dep; imported a module named dep.nr? Though maybe that should be disallowed... 🤔

Additional Context

None

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@asterite
Copy link
Collaborator Author

asterite commented Jul 5, 2024

Oooh... nevermind. It seems the idea is to remove dep: #4946

@asterite asterite closed this Jul 5, 2024
@asterite asterite deleted the ab/parse-use-dep-tree branch July 5, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use dep::{foo, bar} is formatted into use {foo, bar} which is invalid

1 participant