Skip to content

RFC: Infer the type of float literals #3059

@brson

Description

@brson
Contributor

Roadmap says "There is general consensus that floating point literals are too long; 1.0f will likely become sugar for 1.0f32. This is purely a backwards-compatible change."

Not sure the details - I think we already have a f literal though for float.

Activity

pcwalton

pcwalton commented on Sep 6, 2012

@pcwalton
Contributor

The fact that f already means float is a problem. I propose keeping the literals the way they are and inferring which float is meant, much as we do for integers.

catamorphism

catamorphism commented on Dec 7, 2012

@catamorphism
Contributor

Done in fe02814

added a commit that references this issue on Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-frontendArea: Compiler frontend (errors, parsing and HIR)

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @brson@pcwalton@catamorphism

      Issue actions

        RFC: Infer the type of float literals · Issue #3059 · rust-lang/rust