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

Fix #49660 - Adds checks to ensure existence of arithmetic trait implementations #78259

Merged
merged 3 commits into from
Jan 14, 2021

Commits on Jan 14, 2021

  1. Configuration menu
    Copy the full SHA
    872dc60 View commit details
    Browse the repository at this point in the history
  2. Avoid ident concatenation in macro.

    AFAIK it isn't currently possible to do this. It is also more in line with other tests in the surrounding modules.
    plaflamme committed Jan 14, 2021
    Configuration menu
    Copy the full SHA
    8ddad18 View commit details
    Browse the repository at this point in the history
  3. Adds tests to ensure some base op traits exist.

    These tests invoke the various op traits using all accepted types they
    are implemented for as well as for references to those types.
    
    This fixes rust-lang#49660 and ensures the following implementations exist:
    
    * `Add`, `Sub`, `Mul`, `Div`, `Rem`
      * `T op T`, `T op &T`, `&T op T` and `&T op &T`
      * for all integer and floating point types
    * `AddAssign`, `SubAssign`, `MulAssign`, `DivAssign`, `RemAssign`
      * `&mut T op T` and `&mut T op &T`
      * for all integer and floating point types
    * `Neg`
      * `op T` and `op &T`
      * for all signed integer and floating point types
    * `Not`
      * `op T` and `op &T`
      * for `bool`
    * `BitAnd`, `BitOr`, `BitXor`
      * `T op T`, `T op &T`, `&T op T` and `&T op &T`
      * for all integer types and bool
    * `BitAndAssign`, `BitOrAssign`, `BitXorAssign`
      * `&mut T op T` and `&mut T op &T`
      * for all integer types and bool
    * `Shl`, `Shr`
      * `L op R`, `L op &R`, `&L op R` and `&L op &R`
      * for all pairs of integer types
    * `ShlAssign`, `ShrAssign`
      * `&mut L op R`, `&mut L op &R`
      * for all pairs of integer types
    plaflamme committed Jan 14, 2021
    Configuration menu
    Copy the full SHA
    64d695b View commit details
    Browse the repository at this point in the history