]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/must_use_candidates.fixed
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / must_use_candidates.fixed
index bac05c0931c1563fe6ab350693f1046f1f053cb3..9556f6f82cc6313d39125487819635ce0b0eed7f 100644 (file)
@@ -1,5 +1,6 @@
 // run-rustfix
-#![allow(unused_mut)]
+#![feature(never_type)]
+#![allow(unused_mut, clippy::redundant_allocation)]
 #![warn(clippy::must_use_candidate)]
 use std::rc::Rc;
 use std::sync::atomic::{AtomicBool, Ordering};
@@ -82,6 +83,11 @@ pub unsafe fn mutates_static() -> usize {
     COUNTER
 }
 
+#[no_mangle]
+pub fn unmangled(i: bool) -> bool {
+    !i
+}
+
 fn main() {
     assert_eq!(1, pure(1));
 }