diff options
| author | bors <bors@rust-lang.org> | 2014-10-12 06:17:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-12 06:17:17 +0000 |
| commit | 38517d0eba2ee69443449fbe6b1ce7dea7deca7b (patch) | |
| tree | 3b823b949de8c4552dce4d01a1b6c58910a64cd7 /src/doc/reference.md | |
| parent | 86509d8d7ab68c5e4202dea9ff1bfb79409f2f8d (diff) | |
| parent | 4442e6d890136dd20b807140f60718d62f023392 (diff) | |
| download | rust-38517d0eba2ee69443449fbe6b1ce7dea7deca7b.tar.gz rust-38517d0eba2ee69443449fbe6b1ce7dea7deca7b.zip | |
auto merge of #17952 : jakub-/rust/remove-virtual-structs, r=eddyb
Closes #17861.
Diffstat (limited to 'src/doc/reference.md')
| -rw-r--r-- | src/doc/reference.md | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index c34a136a68e..7c42783e698 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1328,23 +1328,6 @@ let c = [Cookie, Cookie, Cookie, Cookie]; The precise memory layout of a structure is not specified. One can specify a particular layout using the [`repr` attribute](#ffi-attributes). -By using the `struct_inherit` feature gate, structures may use single -inheritance. A Structure may only inherit from a single other structure, called -the _super-struct_. The inheriting structure (sub-struct) acts as if all fields -in the super-struct were present in the sub-struct. Fields declared in a -sub-struct must not have the same name as any field in any (transitive) -super-struct. All fields (both declared and inherited) must be specified in any -initializers. Inheritance between structures does not give subtyping or -coercion. The super-struct and sub-struct must be defined in the same crate. -The super-struct must be declared using the `virtual` keyword. For example: - -```{.ignore} -virtual struct Sup { x: int } -struct Sub : Sup { y: int } -let s = Sub {x: 10, y: 11}; -let sx = s.x; -``` - ### Enumerations An _enumeration_ is a simultaneous definition of a nominal [enumerated |
