]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/identity_conversion.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / identity_conversion.rs
index 8f5bd12bc9f08c23452f3105f0f81c280e0386c4..6ba191b0b843acb6baabaa458c15b1ac3bd7f04a 100644 (file)
@@ -1,4 +1,13 @@
-#![deny(identity_conversion)]
+// 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::identity_conversion)]
 
 fn test_generic<T: Copy>(val: T) -> T {
     let _ = T::from(val);
@@ -28,7 +37,7 @@ fn main() {
     let _: String = "foo".into();
     let _: String = From::from("foo");
     let _ = String::from("foo");
-    #[allow(identity_conversion)]
+    #[allow(clippy::identity_conversion)]
     {
         let _: String = "foo".into();
         let _ = String::from("foo");
@@ -41,4 +50,5 @@ fn main() {
     let _ = String::from(format!("A: {:04}", 123));
     let _ = "".lines().into_iter();
     let _ = vec![1, 2, 3].into_iter().into_iter();
+    let _: String = format!("Hello {}", "world").into();
 }