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 Connection | |
| { | |
| active: *mut bool, | |
| payload: *mut c_void, | |
| callback: fn(*mut c_void), | |
| } | |
| impl Connection | |
| { | |
| pub fn new(payload: *mut c_void, callback: fn(*mut c_void)) -> (Connection, Connection) |
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
| test.rs:4:6: 4:30 error: unresolved import: there is no `BenchHarness` in `test::test` | |
| test.rs:4 use self::test::BenchHarness; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~ | |
| test.rs:4:6: 4:30 error: failed to resolve import `self::test::BenchHarness` | |
| test.rs:4 use self::test::BenchHarness; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~ | |
| error: aborting due to 2 previous errors |
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
| #![feature(macro_rules)] | |
| struct Location | |
| { | |
| x: f32, | |
| y: f32 | |
| } | |
| struct Velocity |
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
| use std::cast; | |
| use std::libc::{c_void, malloc, free}; | |
| struct A | |
| { | |
| a: *mut c_void | |
| } | |
| impl Drop for A | |
| { |
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
| test.rs:15:3: 15:4 error: cannot capture variable of type `proc(Test)`, which does not fulfill `Send`, in a bounded closure | |
| test.rs:15 a(Test{ mutex: Arc::new(Mutex::new(())) } ); | |
| ^ | |
| test.rs:15:3: 15:4 note: this closure's environment must satisfy `Send` | |
| test.rs:15 a(Test{ mutex: Arc::new(Mutex::new(())) } ); |
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 bmp = core.create_bitmap(256, 256); | |
| match bmp | |
| { | |
| Some(b) => /* b is not NULL */, | |
| None => /* b is NULL, but inaccessible */ | |
| } |
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 MyArray<T>(~[T]); | |
| trait Foo {} | |
| struct A; | |
| impl Foo for A {} | |
| struct B; | |
| impl Foo for B {} |
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 S<'l> | |
| { | |
| data: &'l [u8] | |
| } | |
| struct MS<'l> | |
| { | |
| data: &'l mut [u8] | |
| } |
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 S<T> | |
| { | |
| data: T | |
| } | |
| trait Mut<'l> | |
| { | |
| fn set(self, idx: uint, val: u8); | |
| } |
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 S; | |
| trait Get | |
| { | |
| fn get(self); | |
| } | |
| trait Set | |
| { | |
| fn set(self); | |
| } |