]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/checked_unwrap.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / checked_unwrap.rs
index b3979245d3631269a913ff8069b07d8f017e7416..4d250a80e903affc7f948f99fbc827489ed07830 100644 (file)
@@ -1,4 +1,11 @@
-#![feature(tool_lints)]
+// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
 
 #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
 #![allow(clippy::if_same_then_else)]
@@ -33,11 +40,11 @@ fn main() {
     if x.is_ok() {
         x = Err(());
         x.unwrap(); // not unnecessary because of mutation of x
-        // it will always panic but the lint is not smart enough to see this (it only checks if conditions).
+                    // it will always panic but the lint is not smart enough to see this (it only checks if conditions).
     } else {
         x = Ok(());
         x.unwrap_err(); // not unnecessary because of mutation of x
-        // it will always panic but the lint is not smart enough to see this (it only checks if conditions).
+                        // it will always panic but the lint is not smart enough to see this (it only checks if conditions).
     }
 }