Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Inside a module:

[E0603] Error: struct `Foo` is private
   ╭─[ command_2:1:1 ]
   │
 7 │ let x = foo::Foo {a: 12};
   │              ─┬─  
   │               ╰─── private struct
   │
   ├─[ command_2:1:1 ]
   │
 2 │   struct Foo {
   │   ─────┬────  
   │        ╰────── note: the struct `Foo` is defined here
───╯
[E0616] Error: field `a` of struct `Foo` is private
   ╭─[ command_2:1:1 ]
   │
 8 │ x.a
   │   ┬  
   │   ╰── private field
───╯
[E0616] Error: field `a` of struct `Foo` is private
   ╭─[ command_3:1:1 ]
   │
 8 │ x.a
   │   ┬  
   │   ╰── private field
───╯
12

Using constructor function new():

The type of the variable x was redefined, so was lost.
12