rust-lang / rust-lang/fls

Values of path expressions

Open
#466 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-resolve C-enhancement
Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

§6.3:5 (fls_5ifai8nkp5ek) says

The value of a path expression is the entity that it resolved to.

But the value of an expression needs to be a member of some type in the Rust type system, not an entity.

This section needs to cover each kind of entity that a path expression can resolve to, and explain how to use it to get a value or a place.

For example:

  • for a function, the value is the unique member of the corresponding function item type

  • for a constant, the value is obtained by evaluating the constant initializer

  • for a variable, we have a place expression representing the place in the current activation record which corresponds to that variable

I see a notion of "elaboration" is defined for constants, which seems to be what's needed here, but there's no text linking it to evaluating expressions that mention constants.

Similarly §6.3:4 (fls_cjywisyiyti6) says

The type of a path expression is the type of the entity that it resolved to.

But the section on Entities doesn't define the notion of an entity's type.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with §6.3:4 and §6.3:5, then read the Entities section and the definition of constant elaboration. Clarify how path expressions resolve to functions, constants, and variables, including their values or places, and define how their types are determined. Done when the path-expression rules consistently connect entities, types, and constant evaluation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.