Skip to content

max_value() vs MAX #29841

Closed
Closed
@snowe2010

Description

@snowe2010

I'm not sure if I'm calling this wrong, but when I try to use

let inf = std::u32::max_value();

I get the error:

src\main.rs:3:13: 3:32 error: unresolved name `std::u32::max_value` [E0425]
src\main.rs:3   let inf = std::u32::max_value();

, but following PR #11790 it looks like it should be

let inf = std::u32::MAX;

which of course works. None of this is a problem, except the documentation says to use max_value()

https://doc.rust-lang.org/std/primitive.u32.html

Please let me know if I'm doing something wrong though.

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