]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/must_use_candidates.rs
iterate List by value
[rust.git] / tests / ui / must_use_candidates.rs
index 29c0752994af0586a4657e8c014609002d321fa8..3732422017104ccaf788e747de9c07ac99eb758a 100644 (file)
@@ -1,6 +1,6 @@
 // run-rustfix
 #![feature(never_type)]
-#![allow(unused_mut)]
+#![allow(unused_mut, clippy::redundant_allocation)]
 #![warn(clippy::must_use_candidate)]
 use std::rc::Rc;
 use std::sync::atomic::{AtomicBool, Ordering};
@@ -83,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));
 }