diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/crashes/ice-14935.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/crashes/ice-14935.rs b/tests/ui/crashes/ice-14935.rs new file mode 100644 index 00000000000..74cda9aae53 --- /dev/null +++ b/tests/ui/crashes/ice-14935.rs @@ -0,0 +1,27 @@ +//@check-pass +#![warn(clippy::mutable_key_type)] + +use std::marker::PhantomData; + +trait Group { + type ExposantSet: Group; +} + +struct Pow<T: Group> { + exposant: Box<Pow<T::ExposantSet>>, + _p: PhantomData<T>, +} + +impl<T: Group> Pow<T> { + fn is_zero(&self) -> bool { + false + } + fn normalize(&self) { + #[expect(clippy::if_same_then_else)] + if self.is_zero() { + } else if false { + } + } +} + +fn main() {} |
