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

Add traits for primitive numeric types #6071

Closed
wants to merge 15 commits into from

Commits on Apr 25, 2013

  1. Add is_zero method to Zero

    brendanzab committed Apr 25, 2013
    Configuration menu
    Copy the full SHA
    ad0b337 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dbc2e99 View commit details
    Browse the repository at this point in the history
  3. Minor style improvements for test functions

    Use argument pattern-matching for test_division_rule and remove visibility specifier for test_signed
    brendanzab committed Apr 25, 2013
    Configuration menu
    Copy the full SHA
    f40be99 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2013

  1. Configuration menu
    Copy the full SHA
    b624210 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4c07f5e View commit details
    Browse the repository at this point in the history
  3. Add BitCount trait

    brendanzab committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    d073745 View commit details
    Browse the repository at this point in the history
  4. Fix failing test

    brendanzab committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    faaf3bf View commit details
    Browse the repository at this point in the history
  5. Combine PrimitiveInt, Int, and Uint traits into one single trait

    Having three traits for primitive ints/uints seemed rather excessive. If users wish to specify between them they can simply combine Int with either the Signed and Unsigned traits. For example: fn foo<T: Int + Signed>() { … }
    brendanzab committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    6efbbf2 View commit details
    Browse the repository at this point in the history
  6. Add Orderable trait

    This is a temporary trait until we have default methods. We don't want to encumber all implementors of Ord by requiring them to implement these functions, but at the same time we want to be able to take advantage of the speed of the specific numeric functions (like the `fmin` and `fmax` intrinsics).
    brendanzab committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    6cc7107 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b7cf89f View commit details
    Browse the repository at this point in the history
  8. Add additional constants to primitive floating point numbers

    These follow the values defined in the C99 standard
    brendanzab committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    4cc9d0b View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2013

  1. Configuration menu
    Copy the full SHA
    32df8ed View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary fallbacks

    The `target_word_size` attribute is always available at compile time, so there is no need for a fallback.
    brendanzab committed Apr 27, 2013
    Configuration menu
    Copy the full SHA
    35f33c1 View commit details
    Browse the repository at this point in the history
  3. Fix copy-paste mistakes

    brendanzab committed Apr 27, 2013
    Configuration menu
    Copy the full SHA
    c9d099d View commit details
    Browse the repository at this point in the history
  4. 5 Configuration menu
    Copy the full SHA
    9cdf402 View commit details
    Browse the repository at this point in the history