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
Running target/debug/parser-4592a6b517fc46f5 | |
running 5 tests | |
test mdo::test::mdo ... ok | |
test mdo::test::mdo_closure ... ok | |
test monad::test::associativity ... ok | |
test monad::test::right_identity ... ok | |
test monad::test::left_identity ... ok | |
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured |
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
#![crate_name = "parser"] | |
#![crate_type = "lib"] | |
use std::ops::Add; | |
/// ``` | |
/// use parser::test; | |
/// | |
/// assert_eq!(test::<i32>(1)(2), 3); | |
/// ``` |
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
[package] | |
name = "test" | |
version = "0.1.0" | |
authors = ["Martin Wernstål <m4rw3r@gmail.com>"] | |
[dependencies.parser] | |
path = "/Users/m4rw3r/Projects/Self/rust_parser" |
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
error: internal compiler error: fictitious type impl Parser<u8, &'static [u8], error::Error<u8>> + Sized + 'static in sizing_type_of() | |
note: the compiler unexpectedly panicked. this is a bug. | |
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | |
thread 'rustc' panicked at 'Box<Any>', src/libsyntax/diagnostic.rs:253 | |
stack backtrace: | |
1: 0x1070328f5 - sys::backtrace::write::hbde7a04ac5266f40Cxs | |
2: 0x10703b9fe - panicking::on_panic::hebff0ba18b62efb1kYw | |
3: 0x106ff53e2 - rt::unwind::begin_unwind_inner::hda386695be757df8vGw | |
4: 0x104c6741f - rt::unwind::begin_unwind::h4700935743387377434 |
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
error: internal compiler error: fictitious type impl Parser<u8, &'static [u8], error::Error<u8>> + Sized + 'static in sizing_type_of() | |
note: the compiler unexpectedly panicked. this is a bug. | |
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | |
thread 'rustc' panicked at 'Box<Any>', src/libsyntax/diagnostic.rs:253 | |
stack backtrace: | |
1: 0x1080028f5 - sys::backtrace::write::ha0bc4a9bddc6a867Cxs | |
2: 0x10800b9fe - panicking::on_panic::ha9dfbe03b50c004akYw | |
3: 0x107fc53e2 - rt::unwind::begin_unwind_inner::hca93a9fd146d03e3vGw |
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
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs | |
index 61e81d7..69328e8 100644 | |
--- a/src/librustc_trans/trans/base.rs | |
+++ b/src/librustc_trans/trans/base.rs | |
@@ -2343,6 +2343,8 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef { | |
let val = match item { | |
ast_map::NodeItem(i) => { | |
let ty = ccx.tcx().node_id_to_type(i.id); | |
+ let ty = monomorphize::normalize_associated_type(ccx.tcx(), &ty); | |
+ |
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
➜ rust_parser git:(unboxed-closures_http_parser) RUST_LOG=rustc_trans::trans::type_of cargo build | |
Compiling parser v0.0.1 (file:///Users/m4rw3r/Projects/Self/rust_parser) | |
DEBUG:rustc_trans::trans::type_of: type_of &'static [&'static str] | |
DEBUG:rustc_trans::trans::type_of: type_of [&'static str] | |
DEBUG:rustc_trans::trans::type_of: type_of &'static str | |
DEBUG:rustc_trans::trans::type_of: --> mapped t=&'static str &'static str to llty=%str_slice = type { i8*, i64 } | |
DEBUG:rustc_trans::trans::type_of: --> mapped t=[&'static str] [&'static str] to llty=%str_slice = type { i8*, i64 } | |
DEBUG:rustc_trans::trans::type_of: --> mapped t=&'static [&'static str] &'static [&'static str] to llty={ %str_slice*, i64 } | |
DEBUG:rustc_trans::trans::type_of: type_of u8 | |
DEBUG:rustc_trans::trans::type_of: --> mapped t=u8 u8 to llty=i8 |
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
Compiling parser v0.0.1 (file:///Users/m4rw3r/Projects/Self/rust_parser) | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: text | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_mod | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_mod | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item |
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
Compiling parser v0.0.1 (file:///Users/m4rw3r/Projects/Self/rust_parser) | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: text | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_mod | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_mod | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item | |
DEBUG:rustc_trans::trans::base: new InsnCtxt: trans_item |
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
DEBUG:rustc::middle::infer: normalize_associated_type(t=FnConverging(impl Parser<'static, u8, u8, error::Error<u8>> + Sized + 'static)) | |
DEBUG:rustc::middle::infer: normalize_associated_types(infcx.deanonymize=true) | |
DEBUG:rustc::middle::infer: erase_regions(FnConverging(impl Parser<'static, u8, u8, error::Error<u8>> + Sized + 'static)) = FnConverging(impl Parser<u8, u8, error::Error<u8>> + Sized + 'static) | |
DEBUG:rustc::middle::traits::project: AssociatedTypeNormalizer::fold(value=FnConverging(impl Parser<u8, u8, error::Error<u8>> + Sized + 'static), has_projection_types=false, deanonymize=true, has_associated_types=true) | |
DEBUG:rustc::middle::traits::project: AssociatedTypeNormalizer::fold_ty(ty=impl Parser<u8, u8, error::Error<u8>> + Sized + 'static) | |
DEBUG:rustc::middle::traits::project: AssociatedTypeNormalizer::fold_ty(ty=u8) | |
DEBUG:rustc::middle::traits::project: AssociatedTypeNormalizer::fold_ty(ty=u8) | |
DEBUG:rustc::middle::traits::project: AssociatedTypeNormalizer::fold_ty(ty=error::Error<u8>) | |
DEBUG:rustc:: |