Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add min_value, max_value methods #23947

Merged
merged 1 commit into from
Apr 2, 2015
Merged

Conversation

aturon
Copy link
Member

@aturon aturon commented Apr 1, 2015

Recent numerics stabilization removed the inherent min_value and
max_value methods from integer types, assuming that the module-level
constants would suffice. However, that failed to account for the use
case in FFI code when dealing with integer type aliases.

This commit reintroduces the methods as #[stable], since this is
essential functionality for 1.0.

It's unfortunate to freeze these as methods, but when we can provide
inherent associated constants these methods can be deprecated.

r? @sfackler
cc @alexcrichton

@sfackler
Copy link
Member

sfackler commented Apr 1, 2015

@bors r+ 8ace751

Recent numerics stabilization removed the inherent `min_value` and
`max_value` methods from integer types, assuming that the module-level
constants would suffice. However, that failed to account for the use
case in FFI code when dealing with integer type aliases.

This commit reintroduces the methods as `#[stable]`, since this is
essential functionality for 1.0.

It's unfortunate to freeze these as methods, but when we can provide
inherent associated constants these methods can be deprecated.
@aturon
Copy link
Member Author

aturon commented Apr 1, 2015

@bors: r=sfackler c0f86a9

@alexcrichton
Copy link
Member

🗻

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 1, 2015
Recent numerics stabilization removed the inherent `min_value` and
`max_value` methods from integer types, assuming that the module-level
constants would suffice. However, that failed to account for the use
case in FFI code when dealing with integer type aliases.

This commit reintroduces the methods as `#[stable]`, since this is
essential functionality for 1.0.

It's unfortunate to freeze these as methods, but when we can provide
inherent associated constants these methods can be deprecated.

r? @sfackler
cc @alexcrichton
@alexcrichton alexcrichton merged commit c0f86a9 into rust-lang:master Apr 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants