Issue 1:
I was doing some refactoring on rust-cleverbot and then I encountered the error below. The following one is the diff of the changes I applied in order to get it: https://github.com/RoxasShadow/rust-cleverbot/compare/onoez?expand=1

Meta

rustc --version --verbose:

rustc 1.0.0 (a59de37 2015-05-13) (built 2015-05-14)

binary: rustc

commit-hash: a59de37

commit-date: 2015-05-13

build-date: 2015-05-14

host: x86_64-apple-darwin

release: 1.0.0

Backtrace:

┌[giovanni@Mozes-Air] [/dev/ttys001] [onoez]

└[~/Desktop/rust-cleverbot]> cargo run --example think Ciao! --verbose

Fresh libc v0.1.8

Fresh unicase v0.1.0

Fresh httparse v0.1.2

Fresh bitflags v0.1.1

Fresh lazy_static v0.1.10

Fresh matches v0.1.2

Fresh typeable v0.1.1

Fresh rustc-serialize v0.3.14

Fresh traitobject v0.0.1

Fresh gcc v0.3.5

Fresh pkg-config v0.3.4

Fresh rand v0.3.8

Fresh log v0.3.1

Fresh num_cpus v0.2.6

Fresh url v0.2.34

Fresh mime v0.0.11

Fresh time v0.1.25

Fresh openssl-sys v0.6.2

Fresh rust-crypto v0.2.31

Fresh openssl v0.6.2

Compiling rust-cleverbot v0.0.1 (file:///Users/giovanni/Desktop/rust-cleverbot)

Running rustc src/lib.rs --crate-name cleverbot --crate-type lib -g --out-dir /Users/giovanni/Desktop/rust-cleverbot/target/debug --emit=dep-info,link -L dependency=/Users/giovanni/Desktop/rust-cleverbot/target/debug -L dependency=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps --extern url=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps/liburl-beb2c5952735425a.rlib --extern crypto=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps/libcrypto-67f1ad94f3ffe5f4.rlib --extern hyper=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps/libhyper-f7b4259bc2dab307.rlib -L native=/usr/lib -L native=/Users/giovanni/Desktop/rust-cleverbot/target/debug/build/openssl-sys-5040130ff99796a0/out -L native=/Users/giovanni/Desktop/rust-cleverbot/target/debug/build/rust-crypto-67f1ad94f3ffe5f4/out -L native=/Users/giovanni/Desktop/rust-cleverbot/target/debug/build/time-e758cbe877e9589d/out

Fresh cookie v0.1.20

Fresh hyper v0.5.1

src/lib.rs:1:1: 1:1 error: internal compiler error: cannot relate bound region: ReStatic <= ReEarlyBound(360, TypeSpace, 0, 'a)

src/lib.rs:1 extern crate url;

^

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

note: run with RUST_BACKTRACE=1 for a backtrace

thread 'rustc' panicked at 'Box', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:149

stack backtrace:

1: 0x103a45e7f - sys::backtrace::write::h7807ec07859fb503t1r

2: 0x103a4e4b2 - panicking::on_panic::ha0ed2b9b562a7f9ctZv

3: 0x103a0ae35 - rt::unwind::begin_unwind_inner::hbfb8d99cb52be7a1cHv

4: 0x1031e743e - rt::unwind::begin_unwind::h14482673826369992638

5: 0x1031e73ca - diagnostic::SpanHandler::span_bug::ha80d5103c6dc346fEqB

6: 0x1010acc2b - middle::infer::region_inference::RegionVarBindings<'a, 'tcx>::make_subregion::h424c309cfde0bc8dtiv

7: 0x101063c9b - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::regions::h7b6335e10c5e2accAux

8: 0x101063a81 - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::relate_with_variance::h14347860495291865360

9: 0x101062ffb - middle::ty_relate::relate_substs::h12261092315780768762

10: 0x1010625ea - middle::ty_relate::relate_item_substs::h10479042000615633136

11: 0x1010c3724 - middle::ty_relate::super_relate_tys::h8062529144464697345

12: 0x10105aea2 - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::tys::h39efa003c9af43d1dqx

13: 0x1010c8227 - middle::infer::InferCtxt<'a, 'tcx>::sub_types::h43541a86e23825d8Xjz

14: 0x1006eee35 - check::method::probe::ProbeContext<'a, 'tcx>::consider_candidates::hb77291381a7d8dc300h

15: 0x1006eebd9 - check::method::probe::ProbeContext<'a, 'tcx>::pick_method::ha530aac6fb2586e2XWh

16: 0x1006edfa6 - check::method::probe::ProbeContext<'a, 'tcx>::pick_core::h9d29a0dbf0c8dd7bRRh

17: 0x1006e378c - check::method::probe::probe::closure.31169

18: 0x1006e0e59 - check::method::probe::probe::hc6eba1678c1d154fWGg

19: 0x1006fbb7d - check::method::resolve_ufcs::he4f736b36751a4a2gJj

20: 0x100788280 - check::check_expr_with_unifier::h3772037143783809604

21: 0x10071d25c - check::callee::check_call::h6e64f97ca920f598QTl

22: 0x10076bd51 - check::check_expr_with_unifier::h11298596628612541945

23: 0x100792a7b - check::check_decl_local::hf2bb5e27a41be699hOr

24: 0x10073b1da - check::check_block_with_expected::h1a2a965f24479edbnUr

25: 0x10071c828 - check::check_fn::h4b472c723dc36ca2UGn

26: 0x100736985 - check::check_bare_fn::h87d6505bed3e4c61twn

27: 0x10073f887 - check::check_method_body::h1802c6d6e15675a6Y7n

28: 0x1007348cb - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h97ae569543a98538wtn

29: 0x1007fef4a - check_crate::closure.38028

30: 0x1007fa357 - check_crate::h722813c75c795e06XcC

31: 0x1005635f4 - driver::phase_3_run_analysis_passes::h3394cefeecbff846nGa

32: 0x100544ffc - driver::compile_input::hf0607b3d1fd498bcQba

33: 0x10060d5a3 - run_compiler::he7a5311c755081d7z4b

34: 0x10060b0ca - boxed::F.FnBox::call_box::h5234503372052129763

35: 0x10060a567 - rt::unwind::try::try_fn::h4031265711883657142

36: 0x103acf508 - rust_try_inner

37: 0x103acf4f5 - rust_try

38: 0x10060a840 - boxed::F.FnBox::call_box::h1044299548107784679

39: 0x103a4cffd - sys:🧵:create::thread_start::ha3be9b31a8775143L4u

40: 0x7fff916a4267 - _pthread_body

41: 0x7fff916a41e4 - _pthread_start

Could not compile rust-cleverbot.

Caused by:

Process didn't exit successfully: rustc src/lib.rs --crate-name cleverbot --crate-type lib -g --out-dir /Users/giovanni/Desktop/rust-cleverbot/target/debug --emit=dep-info,link -L dependency=/Users/giovanni/Desktop/rust-cleverbot/target/debug -L dependency=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps --extern url=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps/liburl-beb2c5952735425a.rlib --extern crypto=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps/libcrypto-67f1ad94f3ffe5f4.rlib --extern hyper=/Users/giovanni/Desktop/rust-cleverbot/target/debug/deps/libhyper-f7b4259bc2dab307.rlib -L native=/usr/lib -L native=/Users/giovanni/Desktop/rust-cleverbot/target/debug/build/openssl-sys-5040130ff99796a0/out -L native=/Users/giovanni/Desktop/rust-cleverbot/target/debug/build/rust-crypto-67f1ad94f3ffe5f4/out -L native=/Users/giovanni/Desktop/rust-cleverbot/target/debug/build/time-e758cbe877e9589d/out (exit code: 101)

Issue 2:
I've encountered an internal compiler error when building this code:

use std::iter::*;

pub struct Ilbm<'a> {
body_data: &'a[u8],
data_width: u16,
depth: u8,
mask: u8,
ham: bool,
}

impl<'a> Ilbm<'a> {

fn get_bit(buffer: &[u8], col: usize) -> u8 {
let byte_offset = col / 8;
let bit_offset = 7 - col % 8;
let byte_val = buffer[byte_offset];
(byte_val >> bit_offset) & 1
}

fn draw_row<'b>(&self, decoded_row_planes: Vec<&'b [u8]>) -> Box<Iterator<Item=u8> + 'b> {
let masking = self.mask == 1;

let ham_mask: u8 = if self.ham { if self.depth == 6 { 0x0F } else { 0x3F } } else { 0 };
let ham_shif: u8 = if self.ham { self.depth - 2 } else { 0 };
let depth = self.depth as usize;

Box::new((0..self.data_width)
.flat_map(move |col| {
if masking && Self::get_bit(decoded_row_planes[depth], col as usize) != 1 {
repeat(0).take(4)
}
else {
decoded_row_planes[depth][col as usize]
}
} ))
}

}

Meta

rustc --version --verbose:

rustc 1.0.0-beta.3 (5241bf9c3 2015-04-25) (built 2015-04-25)
binary: rustc
commit-hash: 5241bf9c34d156ea6064367a33cbd7222eeb5789
commit-date: 2015-04-25
build-date: 2015-04-25
host: x86_64-apple-darwin
release: 1.0.0-beta.3

Backtrace:

thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:149

stack backtrace:
1: 0x10affc33f - sys::backtrace::write::h0f2fc53eb11eb814gWr
2: 0x10b004942 - panicking::on_panic::hd617a4042e8486fciUv
3: 0x10afc1375 - rt::unwind::begin_unwind_inner::hd84dfec22ac3667d1Bv
4: 0x10a7a09fe - rt::unwind::begin_unwind::h17792509132866387090
5: 0x10a7a098a - diagnostic::SpanHandler::span_bug::hebb6215f61f436aaEqB
6: 0x10867405b - middle::infer::region_inference::RegionVarBindings<'a, 'tcx>::make_subregion::h4adb78ad460601ecS8u
7: 0x10862aeab - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::regions::h3f9ee82a2e72a144Mjx
8: 0x10862ac91 - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::relate_with_variance::h5672739467683317342
9: 0x10862a20b - middle::ty_relate::relate_substs::h2389761154872115822
10: 0x1086297fa - middle::ty_relate::relate_item_substs::h7360249961707336134
11: 0x10868b447 - middle::ty_relate::super_relate_tys::h10795509169925483940
12: 0x108621bb2 - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::tys::h3174a850422a5fc1pfx
13: 0x10868ff47 - middle::infer::InferCtxt<'a, 'tcx>::sub_types::hea49ed0ad06eecf898y
14: 0x107ccd1d5 - check::method::probe::ProbeContext<'a, 'tcx>::consider_candidates::h2b54d2790fd0880dXoi
15: 0x107cccf79 - check::method::probe::ProbeContext<'a, 'tcx>::pick_method::hc768ec9b0fb6e87dUki
16: 0x107ccc346 - check::method::probe::ProbeContext<'a, 'tcx>::pick_core::h3e5895ad5629b90bOfi
17: 0x107cc1cbc - check::method::probe::probe::closure.31574
18: 0x107cbf389 - check::method::probe::probe::hfbf147788d37ee49T4g
19: 0x107cd9ecd - check::method::resolve_ufcs::h9a77d5ebe946bd48d7j
20: 0x107d65c30 - check::check_expr_with_unifier::h1091590169474595220
21: 0x107cfaf2c - check::callee::check_call::hf304e98e66e2eee3Nhm
22: 0x107d61b0a - check::check_expr_with_unifier::h1091590169474595220
23: 0x107d0a18d - check::op::check_binop::h6504e0630336d4baFan
24: 0x107d498ae - check::check_expr_with_unifier::h4364205555285070129
25: 0x107d0a42e - check::op::check_binop::h6504e0630336d4baFan
26: 0x107d4343b - check::check_expr_with_unifier::h8963715346170232283
27: 0x107d2f66d - check::check_expr_with_unifier::check_then_else::h1d5d0ab6867397defIq
28: 0x107d49b8d - check::check_expr_with_unifier::h4364205555285070129
29: 0x107d191db - check::check_block_with_expected::h83c5e18f3456d9895hs
30: 0x107d49d85 - check::check_expr_with_unifier::h4364205555285070129
31: 0x107d191db - check::check_block_with_expected::h83c5e18f3456d9895hs
32: 0x107cfa508 - check::check_fn::h5c814037ea8a2362C4n
33: 0x107cf8966 - check::closure::check_expr_closure::h0b5d1648c0a7d5409Pl
34: 0x107d25f08 - check::check_expr_with_unifier::h8674341778859500334
35: 0x107d00d9c - check::check_argument_types::hbd54866e0651a010O5p
36: 0x107d0208a - check::check_method_argument_types::h42f31152b61f4a11d3p
37: 0x107d308cc - check::check_expr_with_unifier::check_method_call::h6fc40daeec19d10dlFq
38: 0x107d2595e - check::check_expr_with_unifier::h8674341778859500334
39: 0x107d00d9c - check::check_argument_types::hbd54866e0651a010O5p
40: 0x107cfe0be - check::callee::confirm_builtin_call::h98216b80db4bfd2f5qm
41: 0x107cfc849 - check::callee::check_call::hf304e98e66e2eee3Nhm
42: 0x107d49701 - check::check_expr_with_unifier::h4364205555285070129
43: 0x107d191db - check::check_block_with_expected::h83c5e18f3456d9895hs
44: 0x107cfa508 - check::check_fn::h5c814037ea8a2362C4n
45: 0x107d14599 - check::check_bare_fn::hd839ee74cb29d084bUn
46: 0x107d1d4c7 - check::check_method_body::hf8957dc76229cbd6Gvo
47: 0x107d124db - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hc008350ec16b94ffeRn
48: 0x107ddbeda - check_crate::closure.38340
49: 0x107dd72e7 - check_crate::h7f9bbce56981d322gCC
50: 0x107b3c2d2 - driver::phase_3_run_analysis_passes::hb862dc042470f6e0nGa
51: 0x107b1e09c - driver::compile_input::h4747d8bb1c595fdfQba
52: 0x107be58f3 - run_compiler::hc8c95c5858347fdbz4b
53: 0x107be341a - boxed::F.FnBox<A>::call_box::h7872786064439979928
54: 0x107be28b7 - rt::unwind::try::try_fn::h10239991317224243769
55: 0x10b0857c8 - rust_try_inner
56: 0x10b0857b5 - rust_try
57: 0x107be2b90 - boxed::F.FnBox<A>::call_box::h4543691575426869824
58: 0x10b00348d - sys::thread::create::thread_start::h499b3be451a7bbb8AZu
59: 0x7fff91f30267 - _pthread_body
60: 0x7fff91f301e4 - _pthread_start