]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #806 - varkor:patch-1, r=RalfJung
authorbors <bors@rust-lang.org>
Sun, 30 Jun 2019 15:07:03 +0000 (15:07 +0000)
committerbors <bors@rust-lang.org>
Sun, 30 Jun 2019 15:07:03 +0000 (15:07 +0000)
Fix `unused_must_use` inside `Box`

After https://github.com/rust-lang/rust/pull/62228, this will be linted against (and causes the test to fail). (This blocks https://github.com/rust-lang/rust/pull/62228.)

tests/run-pass/issue-30530.rs

index 10dec30c64ca7125deb4c7fab72fd2514ea948ad..86c2d9184e0166abf30bbb7524a2ebdd7341593e 100644 (file)
@@ -21,7 +21,9 @@ pub enum Handler {
 }
 
 fn main() {
-    take(Handler::Default, Box::new(main));
+    #[allow(unused_must_use)] {
+        take(Handler::Default, Box::new(main));
+    }
 }
 
 #[inline(never)]