]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/min_rust_version_attr.rs
Auto merge of #8619 - pitaj:fix-6973, r=giraffate
[rust.git] / tests / ui / min_rust_version_attr.rs
index 7666d01ffe127bd5a8836c418047e31aed0c2499..f83c3e0e281ca29ccad4714e491feb26a6b18f5e 100644 (file)
@@ -150,6 +150,11 @@ fn err_expect() {
     x.err().expect("Testing expect_err");
 }
 
+fn cast_abs_to_unsigned() {
+    let x: i32 = 10;
+    assert_eq!(10u32, x.abs() as u32);
+}
+
 fn main() {
     filter_map_next();
     checked_conversion();
@@ -168,6 +173,7 @@ fn main() {
     unnest_or_patterns();
     int_from_bool();
     err_expect();
+    cast_abs_to_unsigned();
 }
 
 mod just_under_msrv {