Issue 1:
I tried this code:

enum Foo {
NotLast(Box<Foo>),
Last(u32)
}

fn x(tree: &mut Foo) {
let mut current = tree;

loop {
match current {
&mut Foo::NotLast(ref mut inner) => {
current = &mut *inner;
},
&mut Foo::Last(ref mut val) => {
*val = 1;
},
}
}
}

fn main() {}

And got the following message:

error.rs:11:31: 11:44 error: cannot borrow `current.0` as mutable more than once at a time
error.rs:11 &mut Foo::NotLast(ref mut inner) => {
^~~~~~~~~~~~~
error.rs:11:31: 11:44 note: previous borrow of `current.0` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `current.0` until the borrow ends
error.rs:11 &mut Foo::NotLast(ref mut inner) => {
^~~~~~~~~~~~~
error.rs:19:2: 19:2 note: previous borrow ends here
error.rs:6 fn x(tree: &mut Foo) {
...
error.rs:19 }
^
error.rs:12:17: 12:38 error: cannot assign to `current` because it is borrowed
error.rs:12 current = &mut *inner;
^~~~~~~~~~~~~~~~~~~~~
error.rs:11:31: 11:44 note: borrow of `current` occurs here
error.rs:11 &mut Foo::NotLast(ref mut inner) => {
^~~~~~~~~~~~~
error: internal compiler error: unexpected panic
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 'assertion failed: `(left == right) && (right == left)` (left: `TyS { sty: ty_uint(u32), flags: 0, region_depth: 0 }`, right: `TyS { sty: ty_uniq(TyS { sty: ty_enum(DefId { krate: 0, node: 4 }, Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }, regions: NonerasedRegions(VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }) }), flags: 0, region_depth: 0 }), flags: 0, region_depth: 0 }`)', /tmp/portage/dev-lang/rust-1.0.0_alpha2/work/rustc-1.0.0-alpha.2/src/librustc_borrowck/borrowck/mod.rs:402

The snippet is probably wrong, but the assert should not fail

Meta

rustc 1.0.0-dev (built 2015-02-28)
binary: rustc
commit-hash: unknown
commit-date: unknown
build-date: 2015-02-28
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev

Backtrace:

1: 0x7fe4742d3c20 - sys::backtrace::write::h6db1343660ca93a2KlC
2: 0x7fe4742f9900 - <unknown>
3: 0x7fe474244d80 - rt::unwind::begin_unwind_inner::h734e583390472682RBL
4: 0x7fe474245220 - rt::unwind::begin_unwind_fmt::hdaef33c302b47274nAL
5: 0x7fe473478670 - <unknown>
6: 0x7fe473476f70 - <unknown>
7: 0x7fe473476e90 - <unknown>
8: 0x7fe473463640 - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>.euv..Delegate<'tcx>::borrow::h2a13ad241eee66d6cja
9: 0x7fe47346e160 - <unknown>
10: 0x7fe47346e160 - <unknown>
11: 0x7fe47346e160 - <unknown>
12: 0x7fe47346dff0 - <unknown>
13: 0x7fe473472670 - <unknown>
14: 0x7fe4734761d0 - <unknown>
15: 0x7fe473472670 - <unknown>
16: 0x7fe4734761d0 - <unknown>
17: 0x7fe47348e560 - <unknown>
18: 0x7fe47348fa00 - <unknown>
19: 0x7fe47348f450 - borrowck::check_crate::hdf41b3c11cb3508fzRe
20: 0x7fe4748df1b0 - driver::phase_3_run_analysis_passes::h025b35dbe058134fgHa
21: 0x7fe4748c5610 - driver::compile_input::ha5d27daf21872ba2Gba
22: 0x7fe474993b50 - run_compiler::he50deb5aedf688fcZbc
23: 0x7fe474992480 - <unknown>
24: 0x7fe474991370 - <unknown>
25: 0x7fe474356bc0 - <unknown>
26: 0x7fe474356bb0 - rust_try
27: 0x7fe474991670 - <unknown>
28: 0x7fe4742e7650 - <unknown>
29: 0x7fe46ef4bf40 - <unknown>
30: 0x7fe473eca7d9 - clone
31: 0x0 - <unknown>

Issue 2:
Code to reproduce here: https://github.com/toffaletti/borrow-crash

rustc 1.2.0 (082e47636 2015-08-03)

stack backtrace:
1: 0x103eb47b5 - sys::backtrace::write::hf5ea20500b66cd24uns
2: 0x103ebd013 - panicking::on_panic::hbe02cb0d925cad49iGw
3: 0x103e78dd2 - rt::unwind::begin_unwind_inner::h12ba0ba9dffdecc2uow
4: 0x103e79b29 - rt::unwind::begin_unwind_fmt::hadf0dbf11d345ebfAnw
5: 0x100c3568e - borrowck::LoanPath<'tcx>::common::h38c8ca06e07ec084irf
6: 0x100c3366d - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>::report_error_if_loan_conflicts_with_restriction::h9e6281b29cbce21azGa
7: 0x100c334fa - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>::report_error_if_loans_conflict::h9db6e8829e2a1ce8fEa
8: 0x100c23250 - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>.euv..Delegate<'tcx>::borrow::hda5797bef3402e59Ria
9: 0x100c2ad2c - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_pattern_::h14467536489201103802
10: 0x100c2b5eb - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_pattern_::h14467536489201103802
11: 0x100c2b12a - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_pattern_::h14467536489201103802
12: 0x100c2a6e5 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_pat::h9458671995004733122
13: 0x100c2f403 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
14: 0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
15: 0x100c2f649 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
16: 0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
17: 0x100c2f62e - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
18: 0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
19: 0x100c2f433 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
20: 0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
21: 0x100c4cb45 - borrowck::borrowck_fn::h1de21a9e0166e8daEPe
22: 0x100c4c1d9 - borrowck::BorrowckCtxt<'a, 'tcx>.Visitor<'v>::visit_fn::h93ef453410da10bc2Ge
23: 0x100c4eb14 - visit::walk_impl_item::h15300236788859175913
24: 0x100c4f7ca - visit::walk_item::h3483642570553201847
25: 0x100c4ec68 - borrowck::check_crate::h138dee6ce4dd468bHJe
26: 0x1007998a1 - driver::phase_3_run_analysis_passes::closure.15766
27: 0x100796204 - middle::ty::with_ctxt::h14728011725879770170
28: 0x10079100a - driver::phase_3_run_analysis_passes::h16713467199444562124
29: 0x100774107 - driver::compile_input::hb6d2be5b0fa2247fTba
30: 0x10085013f - run_compiler::h21d74b88eec3fe3bx7b
31: 0x10084d9f3 - boxed::F.FnBox<A>::call_box::h1689969825914258414
32: 0x10084d1b7 - rt::unwind::try::try_fn::h11273853850686318048
33: 0x103f47cc8 - rust_try_inner
34: 0x103f47cb5 - rust_try
35: 0x103ea6c95 - rt::unwind::try::inner_try::h480e3107f6a4b5b9nkw
36: 0x10084d3e8 - boxed::F.FnBox<A>::call_box::h888215220722514405
37: 0x103ebba9d - sys::thread::Thread::new::thread_start::hdb3d925f69c5da4aHIv
38: 0x7fff8f7f8059 - _pthread_body
39: 0x7fff8f7f7fd6 - _pthread_start