File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
13
13
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
14
14
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
15
15
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16
- refs/heads/auto: 6bc278c8c636a3964aca4b8d2d89e0321d345df3
16
+ refs/heads/auto: ff801d662ebdebee4845dcc825b366215e4b88bf
17
17
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
18
18
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
19
19
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
Original file line number Diff line number Diff line change 31
31
//!
32
32
//! ~~~{.rust}
33
33
//! extern mod extra;
34
- //! use extra::getopts::{optopt,optflag,getopts};
34
+ //! use extra::getopts::{optopt,optflag,getopts,Opt };
35
35
//! use std::os;
36
36
//!
37
37
//! fn do_work(inp: &str, out: Option<~str>) {
Original file line number Diff line number Diff line change @@ -38,11 +38,15 @@ there are three common kinds of strings in rust:
38
38
As an example, here's a few different kinds of strings.
39
39
40
40
```rust
41
- let owned_string = ~"I am an owned string";
42
- let managed_string = @"This string is garbage-collected";
43
- let borrowed_string1 = "This string is borrowed with the 'static lifetime";
44
- let borrowed_string2: &str = owned_string; // owned strings can be borrowed
45
- let borrowed_string3: &str = managed_string; // managed strings can also be borrowed
41
+ #[feature(managed_boxes)];
42
+
43
+ fn main() {
44
+ let owned_string = ~"I am an owned string";
45
+ let managed_string = @"This string is garbage-collected";
46
+ let borrowed_string1 = "This string is borrowed with the 'static lifetime";
47
+ let borrowed_string2: &str = owned_string; // owned strings can be borrowed
48
+ let borrowed_string3: &str = managed_string; // managed strings can also be borrowed
49
+ }
46
50
```
47
51
48
52
From the example above, you can see that rust has 3 different kinds of string
You can’t perform that action at this time.
0 commit comments