Skip to content

Too much kw::Empty usage #137978

Open
Open
@nnethercote

Description

@nnethercote

kw::Empty is the name of the empty Symbol. It's used a lot. Most places it's used, it's hard to tell if it means "empty symbol" or "no symbol". I.e. it more or less reinvents the null pointer, something that Rust was supposed to get rid of.

I think a lot of the uses could be removed by using Option<Symbol> instead of Symbol, making the "no symbol" cases much clearer.

Metadata

Metadata

Assignees

Labels

A-technical-debtArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions