This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct TextRun { | |
| priv text: @~str, | |
| priv slice: &str, | |
| priv glyphs: ~[Glyph], | |
| priv size_: Size2D<au>, | |
| priv min_break_width_: au, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let mut m = ~LinearMap(); | |
| m.insert(1, 2); | |
| m.insert(2, 4); | |
| // Freeze it | |
| let m = move m; | |
| // Thaw it | |
| let mut m = move m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let mut c = configure(o); | |
| let home = c.root; | |
| let first_time = os::path_exists(&home.push("sources.json")); | |
| if !first_time && o.free[1] != ~"init" { | |
| cmd_init(&c); | |
| // FIXME (#2662): shouldn't need to reconfigure | |
| c = configure(o); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn spawn<T: Send>(val: T, f: extern fn(T)) { | |
| f(val); | |
| } | |
| fn f(+i: int) { | |
| assert i == 100; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn main() { | |
| for ["Alice", "Bob", "Carol"].each |name| { | |
| let name = *name; | |
| do task::spawn { | |
| let v = rand::Rng().shuffle([1, 2, 3]); | |
| for v.each |num| { | |
| io::print(fmt!("%s says: '%d'\n", name, *num)) | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brian@axis:~/dev/rust-repl$ ./repl | |
| rust> io::println("hi"); | |
| <anon>:3:39: 3:40 error: No rules expected the token ; | |
| <anon>:3 io::println(fmt!("%?",io::println("hi");)); | |
| ^ | |
| rust: task failed at 'explicit failure', /home/brian/dev/rust2/src/libsyntax/diagnostic.rs:52 | |
| rust> io::println("hi") | |
| <anon>:1:0: 1:0 error: can't find crate for `core` | |
| <anon>:1 extern mod std; | |
| ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| match self.buckets[idx] { | |
| Some(Bucket {value: move value, _}) => {Some(value)} | |
| None => fail ~"LinearMap::find: internal logic error" | |
| } | |
| /home/banderson/Dev/rust/src/libcore/send_map.rs:336:44: 336:55 error: cannot bind by-move when matching an lvalue | |
| /home/banderson/Dev/rust/src/libcore/send_map.rs:336 Some(Bucket {value: move value, _}) => {Some(value)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Mozilla and the Rust community are entirely tickled to announce | |
| version 0.4 of the Rust compiler and associated tools. | |
| This release focuses on stabilizing as much of the language syntax as | |
| possible, fully integrating borrowed pointers, and removing argument | |
| modes. The brief release notes are included in this announcement, and | |
| there is further explanation in the detailed release [notes] on the | |
| wiki. Documentation and all the links in this email are available on | |
| the [website]. As always, version 0.4 should be considered an alpha | |
| release, suitable for early adopters and language enthusiasts. Please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern mod std; | |
| use core::pipes; | |
| use std::cell::Cell; | |
| fn bla(from_parent: pipes::Port<~str>, to_parent: pipes::Chan<~str>) { | |
| do task::spawn { | |
| to_parent.send(~"works?"); | |
| from_parent.try_recv(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alexrp | |
| Andrew Paseltiner | |
| auREAX | |
| Ben Blum | |
| Benjamin Peterson | |
| Ben Striegel | |
| Brian Anderson | |
| Brian J. Burg | |
| Chris Peterson | |
| Damian Gryski |