|
| 1 | +// This is a regression test for <https://github.com/rust-lang/rust/issues/107283>. |
| 2 | + |
| 3 | +#![crate_name = "foo"] |
| 4 | + |
| 5 | +use std::convert::TryFrom; |
| 6 | +use std::iter::{Product, Sum}; |
| 7 | +use std::num::TryFromIntError; |
| 8 | +use std::ops::{Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Div, DivAssign, Mul, MulAssign, Not, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign}; |
| 9 | +use std::fmt::{Binary, Debug, Display, LowerExp, LowerHex, Octal, UpperExp, UpperHex}; |
| 10 | +use std::hash::Hash; |
| 11 | + |
| 12 | +// @has 'foo/trait.Fixed.html' |
| 13 | +// @snapshot bounds - '//*[@class="item-decl"]//code' |
| 14 | +pub trait Fixed |
| 15 | +where |
| 16 | + Self: Default + Hash + Ord, |
| 17 | + Self: Debug + Display + LowerExp + UpperExp, |
| 18 | + Self: Binary + Octal + LowerHex + UpperHex, |
| 19 | + Self: Add<Output = Self> + AddAssign, |
| 20 | + Self: Sub<Output = Self> + SubAssign, |
| 21 | + Self: Mul<Output = Self> + MulAssign, |
| 22 | + Self: Div<Output = Self> + DivAssign, |
| 23 | + Self: Rem<Output = Self> + RemAssign, |
| 24 | + Self: Mul<<Self as Fixed>::Bits, Output = Self> + MulAssign<<Self as Fixed>::Bits>, |
| 25 | + Self: Div<<Self as Fixed>::Bits, Output = Self> + DivAssign<<Self as Fixed>::Bits>, |
| 26 | + Self: Rem<<Self as Fixed>::Bits, Output = Self> + RemAssign<<Self as Fixed>::Bits>, |
| 27 | + Self: Rem<<Self as Fixed>::NonZeroBits, Output = Self>, |
| 28 | + Self: RemAssign<<Self as Fixed>::NonZeroBits>, |
| 29 | + Self: Not<Output = Self>, |
| 30 | + Self: BitAnd<Output = Self> + BitAndAssign, |
| 31 | + Self: BitOr<Output = Self> + BitOrAssign, |
| 32 | + Self: BitXor<Output = Self> + BitXorAssign, |
| 33 | + Self: Shl<u32, Output = Self> + ShlAssign<u32>, |
| 34 | + Self: Shr<u32, Output = Self> + ShrAssign<u32>, |
| 35 | + Self: Sum + Product, |
| 36 | + Self: PartialOrd<i8> + PartialOrd<i16> + PartialOrd<i32>, |
| 37 | + Self: PartialOrd<i64> + PartialOrd<i128> + PartialOrd<isize>, |
| 38 | + Self: PartialOrd<u8> + PartialOrd<u16> + PartialOrd<u32>, |
| 39 | + Self: PartialOrd<u64> + PartialOrd<u128> + PartialOrd<usize>, |
| 40 | + Self: PartialOrd<f32> + PartialOrd<f64>, |
| 41 | +{ |
| 42 | + type Bits: From<Self::NonZeroBits>; |
| 43 | + type NonZeroBits: TryFrom<Self::Bits, Error = TryFromIntError>; |
| 44 | +} |
0 commit comments