]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/redundant_field_names.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / redundant_field_names.rs
index 41e90bba368adae8b69893c6ebdbac1555cfe6e5..60569372e5d71af0780a9cd2f77d8a5b4ba3b4ea 100644 (file)
@@ -7,9 +7,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
 #![warn(clippy::redundant_field_names)]
 #![allow(unused_variables)]
 #![feature(inclusive_range, inclusive_range_fields, inclusive_range_methods)]
@@ -17,7 +14,7 @@
 #[macro_use]
 extern crate derive_new;
 
-use std::ops::{Range, RangeFrom, RangeTo, RangeInclusive, RangeToInclusive};
+use std::ops::{Range, RangeFrom, RangeInclusive, RangeTo, RangeToInclusive};
 
 mod foo {
     pub const BAR: u8 = 0;
@@ -46,8 +43,8 @@ fn main() {
         gender: gender,
         age: age,
 
-        name, //should be ok
-        buzz: fizz, //should be ok
+        name,          //should be ok
+        buzz: fizz,    //should be ok
         foo: foo::BAR, //should be ok
     };
 
@@ -71,3 +68,13 @@ fn main() {
     let _ = RangeInclusive::new(start, end);
     let _ = RangeToInclusive { end: end };
 }
+
+fn issue_3476() {
+    fn foo<T>() {}
+
+    struct S {
+        foo: fn(),
+    }
+
+    S { foo: foo::<i32> };
+}