Skip to content

Commit 4442e6d

Browse files
author
Jakub Wieczorek
committed
Remove virtual structs from the reference
1 parent 17da4c7 commit 4442e6d

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/doc/reference.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,23 +1328,6 @@ let c = [Cookie, Cookie, Cookie, Cookie];
13281328
The precise memory layout of a structure is not specified. One can specify a
13291329
particular layout using the [`repr` attribute](#ffi-attributes).
13301330

1331-
By using the `struct_inherit` feature gate, structures may use single
1332-
inheritance. A Structure may only inherit from a single other structure, called
1333-
the _super-struct_. The inheriting structure (sub-struct) acts as if all fields
1334-
in the super-struct were present in the sub-struct. Fields declared in a
1335-
sub-struct must not have the same name as any field in any (transitive)
1336-
super-struct. All fields (both declared and inherited) must be specified in any
1337-
initializers. Inheritance between structures does not give subtyping or
1338-
coercion. The super-struct and sub-struct must be defined in the same crate.
1339-
The super-struct must be declared using the `virtual` keyword. For example:
1340-
1341-
```{.ignore}
1342-
virtual struct Sup { x: int }
1343-
struct Sub : Sup { y: int }
1344-
let s = Sub {x: 10, y: 11};
1345-
let sx = s.x;
1346-
```
1347-
13481331
### Enumerations
13491332

13501333
An _enumeration_ is a simultaneous definition of a nominal [enumerated

0 commit comments

Comments
 (0)