]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/let_underscore_drop.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / let_underscore_drop.rs
index 98593edb9c591216f7f5380b99917489811e8fef..11b50492ab29055ec6223164a2a768a53b9083a8 100644 (file)
@@ -1,4 +1,5 @@
 #![warn(clippy::let_underscore_drop)]
+#![allow(clippy::let_unit_value)]
 
 struct Droppable;
 
@@ -16,4 +17,12 @@ fn main() {
     let _ = Box::new(());
     let _ = Droppable;
     let _ = Some(Droppable);
+
+    // no lint for reference
+    let _ = droppable_ref();
+}
+
+#[must_use]
+fn droppable_ref() -> &'static mut Droppable {
+    unimplemented!()
 }