Skip to content

Alternative approach for constructing the AST and mod/file mapping #3930

Open
@calebcartwright

Description

@calebcartwright

There's been a couple issues of late with syntax/parse errors stemming from files that rustfmt was configured to ignore. The underlying cause has been traced to how the complete AST is constructed for the crate up front and the mod nodes in the AST are then associated to the corresponding files.

Based on discussion in some other threads, it should be possible to construct the AST and create the file/mod mapping via a different approach that addresses the issues encountered currently (and also avoids having to parse and construct an AST for files that rustfmt is just going to ignore anyway).

There's a lot more detail from @topecongiro on the underlying cause with the current approach and the new approach in #3920 (comment)

Metadata

Metadata

Labels

a-modsModule resolution.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions