]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/default_trait_access.fixed
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / default_trait_access.fixed
index 9114d8754dcc8f4b0ad598aa2b0faaaeecd882fb..eedd43619392d67aca02d6877574188cea1e8239 100644 (file)
@@ -1,8 +1,12 @@
 // run-rustfix
-
-#![allow(unused_imports, dead_code)]
+// aux-build: proc_macro_with_span.rs
 #![deny(clippy::default_trait_access)]
+#![allow(dead_code, unused_imports)]
+#![allow(clippy::uninlined_format_args)]
+
+extern crate proc_macro_with_span;
 
+use proc_macro_with_span::with_span;
 use std::default;
 use std::default::Default as D2;
 use std::string;
@@ -46,9 +50,16 @@ fn main() {
 
     let s19 = <DerivedDefault as Default>::default();
 
+    let s20 = UpdateSyntax {
+        s: "foo",
+        ..Default::default()
+    };
+
+    let _s21: String = with_span!(s Default::default());
+
     println!(
-        "[{}] [{}] [{}] [{}] [{}] [{}] [{}] [{}] [{}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}], [{:?}]",
-        s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19,
+        "[{}] [{}] [{}] [{}] [{}] [{}] [{}] [{}] [{}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}] [{:?}]",
+        s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20,
     );
 }
 
@@ -86,3 +97,9 @@ struct ArrayDerivedDefault {
 
 #[derive(Debug, Default)]
 struct TupleStructDerivedDefault(String);
+
+#[derive(Debug, Default)]
+struct UpdateSyntax {
+    pub s: &'static str,
+    pub u: u64,
+}