1 A struct constructor with private fields was invoked.
3 Erroneous code example:
13 let f = Bar::Foo{ a: 0, b: 0 }; // error: field `b` of struct `Bar::Foo`
17 To fix this error, please ensure that all the fields of the struct are public,
18 or implement a function for easy instantiation. Examples:
24 pub b: isize, // we set `b` field public
28 let f = Bar::Foo{ a: 0, b: 0 }; // ok!
37 b: isize, // still private
41 pub fn new() -> Foo { // we create a method to instantiate `Foo`
47 let f = Bar::Foo::new(); // ok!