Skip to content

Instantly share code, notes, and snippets.


Alex Crichton alexcrichton

View GitHub Profile
View aster
name = "aster"
version = "0.2.3"
authors = ["Erick Tryzelaar <>"]
license = "MIT/Apache-2.0"
description = "A libsyntax ast builder"
repository = ""
default = ["syntex_syntax"]
View foo-after
running 5 tests
test read_to_end_doesnt_expand_capacity_unless_necessary ... ignored
test read_to_end_1024 ... bench: 53 ns/iter (+/- 1)
test read_to_end_64k ... bench: 1776 ns/iter (+/- 27)
test read_to_end_normal_test ... bench: 7 ns/iter (+/- 1)
test read_to_end_small_test ... bench: 6 ns/iter (+/- 1)
test result: ok. 0 passed; 0 failed; 1 ignored; 4 measured
extern crate test;
use std::io::prelude::*;
use std::io;
use std::mem;
use std::cmp;
use std::slice;
struct MyBufWriter1<'a> {
buf: &'a mut [u8],
#![feature(test, hash, rand, core)]
extern crate test;
macro_rules! benches {
($f:expr, $var:ident) => {
use std::iter::repeat;
fn str_small(b: &mut ::test::Bencher) {
let $var = "foo";
View cookie-rs_Cargo.toml
use std::io;
use std::iter::repeat;
use std::slice;
pub struct Cursor<T> {
pos: u64,
inner: T,
View 23:2 error: type parameter `__S` must also appear as a type parameter of some type defined within this crate impl <__S: ::serialize::Encoder> ::serialize::Encodable<__S> for Foo { fn encode(&self, __arg_0: &mut __S) -> ::std::result::Result<(), ::__S::Error> { match *self { Foo(ref __self_0_0) => __arg_0.emit_struct("Foo", 1u, |_e| {
... 23:2 note: for a limited time, you can add `#![feature(old_orphan_check)]` to your crate to disable this rule impl <__S: ::serialize::Encoder> ::serialize::Encodable<__S> for Foo {
extern crate test;
const TEXT: &'static str = "Hello World!";
const LONG_TEXT: &'static str = "
There are not many persons who know what wonders are opened to them in the
stories and visions of their youth; for when as children we listen and dream,
we think but half-formed thoughts, and when as men we try to remember, we are
dulled and prosaic with the poison of life. But some of us awake in the night
with strange phantasms of enchanted hills and gardens, of fountains that sing
in the sun, of golden cliffs overhanging murmuring seas, of plains that stretch
View foo.ll
@glob = internal global i64 4
define void @main() {
atomicrmw volatile xchg i64* @glob, i64 5 seq_cst
ret void
View Makefile
all: libfoo.dylib bar.c
clang bar.c -o bar -L. -lfoo -Wl,-rpath,`pwd`
rustc --lib -Z gen-crate-map
ln -nsf libfoo-*.dylib libfoo.dylib
You can’t perform that action at this time.