This file contains 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
clone | |
Matrix { data: [100, 200, 300] } |
This file contains 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
clone | |
move | |
move | |
Matrix { data: [100, 200, 300] } |
This file contains 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
import tango.io.Console; | |
import tango.io.Stdout; | |
import tango.io.stream.Buffered; | |
import tango.stdc.stdio; | |
void main() | |
{ | |
auto b = (cast(BufferedOutput)Cout.stream); | |
auto s = Cout.stream; | |
OutputStream s2 = b; | |
This file contains 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 extra; | |
use std::ops::Add; | |
use std::vec; | |
use std::fmt; | |
use std::io::Writer; | |
use std::num::min; | |
trait VectorGet | |
{ |
This file contains 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::io; | |
fn test1(adder: |add: |x: int, lw: |&mut io::Writer|||) | |
{ | |
let mut out = io::stdout(); | |
let w = &mut out as &mut io::Writer; | |
let add = |x: int, lw: |&mut io::Writer|| | |
{ | |
writeln!(w, "Location: {}", x); |
This file contains 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::num::Zero; | |
trait VectorOf<E> | |
{ | |
fn new() -> Self; | |
fn get<'l>(&'l self, i: uint) -> &'l E; | |
} | |
impl<E> VectorOf<E> for ~[E] | |
{ |
This file contains 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
ldc2 -relocation-model=pic -c test1.d | |
ldc2 -relocation-model=pic -c test2.d | |
ldc2 -shared -of test.so test1.o test2.o |
This file contains 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
rustc --lib lib.rs | |
rustc test.rs -L. |
This file contains 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
pub use a::B; | |
mod a | |
{ | |
pub enum B | |
{ | |
C | |
} | |
} |
This file contains 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:1:4: 1:14 error: function `test` is private | |
test.rs:1 use A::B::test; | |
^~~~~~~~~~ | |
error: aborting due to previous error |
NewerOlder