merge struct similar_name test into the general test file
This commit is contained in:
parent
f004120495
commit
0bef7b5f74
@ -11,8 +11,15 @@
|
||||
//~| NOTE: lint level defined here
|
||||
//~| NOTE: lint level defined here
|
||||
//~| NOTE: lint level defined here
|
||||
//~| NOTE: lint level defined here
|
||||
#![allow(unused)]
|
||||
|
||||
|
||||
struct Foo {
|
||||
apple: i32,
|
||||
bpple: i32,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let specter: i32;
|
||||
let spectre: i32;
|
||||
@ -90,6 +97,13 @@ fn main() {
|
||||
let rx_cake: i32;
|
||||
}
|
||||
|
||||
fn foo() {
|
||||
let Foo { apple, bpple } = unimplemented!();
|
||||
let Foo { apple: spring, //~NOTE existing binding defined here
|
||||
bpple: sprang } = unimplemented!(); //~ ERROR: name is too similar
|
||||
//~^HELP for further information
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
enum MaybeInst {
|
||||
Split,
|
||||
|
@ -1,14 +0,0 @@
|
||||
#![feature(plugin)]
|
||||
#![plugin(clippy)]
|
||||
#![deny(clippy,similar_names)]
|
||||
#![allow(unused)]
|
||||
|
||||
struct Foo {
|
||||
apple: i32,
|
||||
bpple: i32,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let Foo { apple, bpple } = unimplemented!();
|
||||
let Foo { apple: spring, bpple: sprang } = unimplemented!(); //~ ERROR: name is too similar
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user