Skip to content

Explain in literal expression how it translate the token to the value #939

@Havvy

Description

@Havvy
Contributor

Right now the literal tokens chapter describes the behavior of literal expressions and not just the tokens. The behavior of matching the token to a specific primitive value should be described in the literal expressions chapter while the token literals chapter just describes the tokens.

Activity

added
Language CleanupImprovements to existing language which is correct but not clear, or missing examples, or the like.
on Jan 21, 2021
ehuss

ehuss commented on Jan 21, 2021

@ehuss
Contributor

Can you clarify exactly which parts you are referring to? One oddity I see is the discussion about type inference with unsuffixed numbers, but I'm curious what else you're thinking of.

changed the title [-]Split out literal expression and literal tokens[/-] [+]Explain in literal expression how it translate the token to the value[/+] on Jan 22, 2021
added
New ContentMissing features or aspects of language not currently documented.
on Jan 22, 2021
Havvy

Havvy commented on Jan 22, 2021

@Havvy
ContributorAuthor

Ah, that's what I get for not actually checking the tokens page (it's a long page...) while quickly looking at how sparse https://doc.rust-lang.org/reference/expressions/literal-expr.html is. This is actually something just not documented, though yeah, that section on type inference should be moved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-expressionsArea: ExpressionsLanguage CleanupImprovements to existing language which is correct but not clear, or missing examples, or the like.New ContentMissing features or aspects of language not currently documented.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ehuss@Havvy

        Issue actions

          Explain in literal expression how it translate the token to the value · Issue #939 · rust-lang/reference