]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/redundant_field_names.rs
Addition `manual_map` test for `unsafe` blocks
[rust.git] / tests / ui / redundant_field_names.rs
index b379aa661cb61330a5116edbe74b40694177caf0..3f97b80c56828c3842c451bb9b616bb3103e1eec 100644 (file)
@@ -1,13 +1,11 @@
-#![feature(tool_lints)]
-
+// run-rustfix
 #![warn(clippy::redundant_field_names)]
-#![allow(unused_variables)]
-#![feature(inclusive_range, inclusive_range_fields, inclusive_range_methods)]
+#![allow(clippy::no_effect, dead_code, unused_variables)]
 
 #[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;
@@ -36,8 +34,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
     };
 
@@ -61,3 +59,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> };
+}