summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_field_names.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/redundant_field_names.rs')
-rw-r--r--src/tools/clippy/tests/ui/redundant_field_names.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/tools/clippy/tests/ui/redundant_field_names.rs b/src/tools/clippy/tests/ui/redundant_field_names.rs
index 605ffd21e..d8c2286d5 100644
--- a/src/tools/clippy/tests/ui/redundant_field_names.rs
+++ b/src/tools/clippy/tests/ui/redundant_field_names.rs
@@ -1,10 +1,9 @@
-//@run-rustfix
-
+//@aux-build:proc_macros.rs
#![warn(clippy::redundant_field_names)]
#![allow(clippy::extra_unused_type_parameters, clippy::no_effect, dead_code, unused_variables)]
#[macro_use]
-extern crate derive_new;
+extern crate proc_macros;
use std::ops::{Range, RangeFrom, RangeInclusive, RangeTo, RangeToInclusive};
@@ -20,7 +19,6 @@ struct Person {
foo: u8,
}
-#[derive(new)]
pub struct S {
v: String,
}
@@ -59,6 +57,13 @@ fn main() {
let _ = Range { start: start, end: end };
let _ = RangeInclusive::new(start, end);
let _ = RangeToInclusive { end: end };
+
+ external! {
+ let v = String::new();
+ let _ = S {
+ v: v
+ };
+ }
}
fn issue_3476() {