Skip to content

Should the literal 128i8 be valid? #6958

Closed
@bstrie

Description

@bstrie

Not necessarily unprecedented, but can still be surprising:

fn main() {
    println(fmt!("%?", 128i8));  // prints "-128"
}

Do we want to allow this, along with 32768i16 and so on? See also #2438 and #6012.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions