added 'suggest-private-fields' cfail test
This commit is contained in:
parent
838595add0
commit
85069e0529
1 changed files with 13 additions and 0 deletions
13
src/test/compile-fail/suggest-private-fields.rs
Normal file
13
src/test/compile-fail/suggest-private-fields.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// aux-build:struct-field-privacy.rs
|
||||
|
||||
extern crate "struct-field-privacy" as xc;
|
||||
|
||||
use xc::B;
|
||||
|
||||
fn main () {
|
||||
let k = B {
|
||||
aa: 20, //~ ERROR structure `struct-field-privacy::B` has no field named `aa`
|
||||
//~^ HELP did you mean `a`?
|
||||
bb: 20, //~ ERROR structure `struct-field-privacy::B` has no field named `bb`
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue