We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3093e13 commit 18ba75cCopy full SHA for 18ba75c
1 file changed
07-type/07-02-compound-types.md
@@ -60,16 +60,14 @@ struct D;
60
61
不过到目前为止,空结构体后面不能加大括号,这么写会编译错误:
62
63
-补充: 注意,最新的nightly版本已经允许这么写编译通过了!
+补充: 注意,1.9 nightly版本已经允许这么写编译通过了!
64
65
```rust
66
struct C {
67
68
}
69
```
70
71
-不过也有人提出来,这样的写法应该编译通过:https://github.com/rust-lang/rfcs/pull/1506
72
-
73
### 实现结构体 impl
74
75
Rust没有继承,它和Golang不约而同的选择了trait(Golang叫Interface)作为其实现多态的基础。当然了,我们要想对一个结构体写一些专门的成员函数应该怎么写呢?
0 commit comments