Skip to content

Instantly share code, notes, and snippets.

View arielb1's full-sized avatar

Ariel Ben-Yehuda arielb1

View GitHub Profile
This file has been truncated, but you can view the full file.
1:DEBUG:rustc::middle::resolve: (build reduced graph for item) found extern `std`
2:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building external def, priv Public
3:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building module macros
4:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building external def, priv Public
5:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building module bitflags
6:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building external def, priv Inherited
7:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building module rtdeps
8:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building external def, priv Public
9:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building module prelude
10:DEBUG:rustc::middle::resolve: (building reduced graph for external crate) building external d
@arielb1
arielb1 / gist:970e979670109f995aa9
Last active August 29, 2015 14:08
Strange Types
#![feature(tuple_indexing)]
use std::rc::Rc;
use std::mem;
use std::kinds::marker;
// Invariant: &mut Xyz always points to a valid C xyz.
// Xyz rvalues don't exist.
// These leak. I *could* wrap a box or arena, but that would
// complicate things.
trait MyItem<T> {}
impl<T> MyItem<T> for T {}
pub fn build_archive<'a, I: MyItem<&'a (|&uint|:'a)>>(files: I) {}
fn main() {
build_archive(&(|_| { }));
}
trait TypeFoldable {
fn fold_with(&self) -> Self;
}
impl<'a> TypeFoldable for &'a uint {
fn fold_with(&self) -> &'a uint { *self }
}
trait Subst {
fn subst(&self) -> Self;
DEBUG:rustc::middle::trans::monomorphize: monomorphic_fn(fn_id=syntax::ast::DefId{krate: 0u32, node: 622767u32}:mem::uninitialized, psubsts=Substs[types=[[];[];[core::raw::Slice<middle::trans::_match::Opt<'static,'static>>]], regions=erased], hash_id=middle::trans::monomorphize::MonoId{def: syntax::ast::DefId{krate: 0u32, node: 622767u32}, params: middle::subst::VecPerParamSpace<middle::ty::t>{type_limit: 0u, self_limit: 0u, content: collections::vec::Vec<middle::ty::t>{len: 1u, cap: 1u, ptr: (0x7fa612cc7a10 as *mut ())}}})
DEBUG:rustc::middle::trans::monomorphize: monomorphic_fn about to subst into unsafe fn() -> T
DEBUG:rustc::middle::trans::monomorphize: monomorphize_fn mangled to _ZN3mem13uninitialized20h8592197447129453343E
DEBUG:rustc::middle::trans::monomorphize: leaving monomorphic fn mem::uninitialized
DEBUG:rustc::middle::trans::monomorphize: leaving monomorphic fn ptr::read
DEBUG:rustc::middle::trans::monomorphize: leaving monomorphic fn mem::transmute_copy
DEBUG:rustc::middle::trans::monomorphize:
#0 0x00007fffc89ac4e7 in llvm::ComputeMaskedBits(llvm::Value*, llvm::APInt const&, llvm::APInt&, llvm::APInt&, llvm::TargetData const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#1 0x00007fffc89ab8a2 in llvm::ComputeMaskedBits(llvm::Value*, llvm::APInt const&, llvm::APInt&, llvm::APInt&, llvm::TargetData const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#2 0x00007fffc89ac308 in llvm::ComputeMaskedBits(llvm::Value*, llvm::APInt const&, llvm::APInt&, llvm::APInt&, llvm::TargetData const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#3 0x00007fffc91c2197 in llvm::getOrEnforceKnownAlignment(llvm::Value*, unsigned int, llvm::TargetData const*) ()
from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#4 0x00007fffc8d23b8e in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#5 0x00007fffc8d684fb in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#6 0x00007fffc8d688b6 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so.1
#7 0x00007f
#0 0x00007ffff7769720 in rust_fail ()
from /tmp/tmp.Z1LMtWzUfO/servo/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-3e5aeb83-0.9.so
#1 0x00007ffff76c6458 in rt::unwind::Unwinder::begin_unwind::hd890d6617f8679e9HCaO::v0.9 ()
from /tmp/tmp.Z1LMtWzUfO/servo/build/x86_64-unknown-linux-gnu/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-3e5aeb83-0.9.so
#2 0x00007ffff291b621 in rt::unwind::begin_unwind::h5026f0b6238f5657am::v0.1 () at /tmp/tmp.Z1LMtWzUfO/servo/src/components/script/dom/bindings/utils.rs:55
#3 0x00007ffff2aa5099 in script::html::hubbub_html_parser::parse_html () at /tmp/tmp.Z1LMtWzUfO/servo/src/components/script/html/hubbub_html_parser.rs:40
#4 0x00007ffff2ab7a2e in load () at /tmp/tmp.Z1LMtWzUfO/servo/src/components/script/script_task.rs:795
use std::cell::RefCell;
struct Context {
data: RefCell<i32>;
}
struct A<'a> {
context: &'a Context,
}
use std::cell::RefCell;
struct Context {
data: RefCell<i32>;
}
struct A<'a> {
context: &'a Context,
}
expr: s-expr
| quote expr
| atom
s-expr: ( expr-body
expr-body: )
| expr expr-body