]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_bitflags/lib.rs
Rollup merge of #23056 - awlnx:master, r=nrc
[rust.git] / src / librustc_bitflags / lib.rs
index 5115e9a4a20728b332565746dc2459ab96c87efa..c15ddf3ae779fbdfc8377433fde482bb117fa377 100644 (file)
@@ -319,7 +319,7 @@ mod tests {
 
     bitflags! {
         flags AnotherSetOfFlags: i8 {
-            const AnotherFlag = -1_i8,
+            const AnotherFlag = -1,
         }
     }
 
@@ -330,7 +330,7 @@ fn test_bits(){
         assert_eq!(FlagABC.bits(), 0b00000111);
 
         assert_eq!(AnotherSetOfFlags::empty().bits(), 0b00);
-        assert_eq!(AnotherFlag.bits(), !0_i8);
+        assert_eq!(AnotherFlag.bits(), !0);
     }
 
     #[test]
@@ -341,7 +341,7 @@ fn test_from_bits() {
         assert!(Flags::from_bits(0b11) == Some(FlagA | FlagB));
         assert!(Flags::from_bits(0b1000) == None);
 
-        assert!(AnotherSetOfFlags::from_bits(!0_i8) == Some(AnotherFlag));
+        assert!(AnotherSetOfFlags::from_bits(!0) == Some(AnotherFlag));
     }
 
     #[test]
@@ -353,7 +353,7 @@ fn test_from_bits_truncate() {
         assert!(Flags::from_bits_truncate(0b1000) == Flags::empty());
         assert!(Flags::from_bits_truncate(0b1001) == FlagA);
 
-        assert!(AnotherSetOfFlags::from_bits_truncate(0_i8) == AnotherSetOfFlags::empty());
+        assert!(AnotherSetOfFlags::from_bits_truncate(0) == AnotherSetOfFlags::empty());
     }
 
     #[test]