Issue 1:
A bug (#9531) went undetected because I was careless and failed to put a variable definition before all of its uses (SHA: b1a2251).

Further investigation revealed that make does offer an --warn-undefined-variables option that will list all variables that are expanded without being provided a definition.

It might be good if we tried to minimize the number of warnings emitted by that flag, by putting explicit (even if empty) definitions up before their first use.

(Here's the list of warnings emitted, with obvious duplicate entries removed.)

% make -j1 --warn-undefined-variables
Makefile:76: warning: undefined variable `MAKE_RESTARTS'
cfg: build triple x86_64-apple-darwin
cfg: host triples x86_64-apple-darwin
cfg: target triples x86_64-apple-darwin
Makefile:91: warning: undefined variable `RUSTFLAGS'
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-apple-darwin is x86_64
cfg: os for x86_64-apple-darwin is apple-darwin
cfg: using ccache clang
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/platform.mk:370: warning: undefined variable `CFG_LDPATH_i686-pc-mingw32'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/platform.mk:422: warning: undefined variable `CFG_LDPATH_x86_64-w64-mingw32'
Makefile:497: warning: undefined variable `RUSTFLAGS_STAGE0'
Makefile:497: warning: undefined variable `RUSTC_FLAGS_x86_64-apple-darwin'
Makefile:497: warning: undefined variable `CFG_PERF_TOOL'
Makefile:497: warning: undefined variable `RUSTFLAGS_STAGE0'
Makefile:497: warning: undefined variable `RUSTFLAGS_STAGE3'
Makefile:497: warning: undefined variable `RUSTFLAGS_STAGE3'
Makefile:518: warning: undefined variable `HLIBSYNTAX_DEFAULT1_H_x86_64-apple-darwin'
Makefile:518: warning: undefined variable `HLIBSYNTAX_DEFAULT2_H_x86_64-apple-darwin'
Makefile:518: warning: undefined variable `HLIBSYNTAX_DEFAULT3_H_x86_64-apple-darwin'
Makefile:548: warning: undefined variable `CFG_IN_TRANSITION'
Makefile:570: warning: undefined variable `HLIBSYNTAX_DEFAULT2_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/target.mk:134: warning: undefined variable `BORROWCK'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/target.mk:134: warning: undefined variable `CFG_PAXCTL'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/target.mk:134: warning: undefined variable `HLIBSYNTAX_DEFAULT0_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/target.mk:134: warning: undefined variable `HLIBSYNTAX_DEFAULT1_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/target.mk:134: warning: undefined variable `HLIBSYNTAX_DEFAULT2_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/target.mk:134: warning: undefined variable `HLIBSYNTAX_DEFAULT3_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/host.mk:148: warning: undefined variable `STDLIB_DSYM_GLOB'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:29: warning: undefined variable `1'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:29: warning: undefined variable `OSTYPE_'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:40: warning: undefined variable `MAKECMDGOALS'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `,'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `MORESTACK_OBJS_x86_64-apple-darwin_0'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `,'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `MORESTACK_OBJS_x86_64-apple-darwin_1'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `,'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `MORESTACK_OBJS_x86_64-apple-darwin_2'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `,'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/rt.mk:287: warning: undefined variable `MORESTACK_OBJS_x86_64-apple-darwin_3'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:219: warning: undefined variable `HLIBSYNTAX_DEFAULT0_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:219: warning: undefined variable `HLIBSYNTAX_DEFAULT1_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:219: warning: undefined variable `HLIBSYNTAX_DEFAULT2_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:219: warning: undefined variable `HLIBSYNTAX_DEFAULT3_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:226: warning: undefined variable `LIBRUST_DSYM_GLOB'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:226: warning: undefined variable `HLIBSYNTAX_DEFAULT1_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:226: warning: undefined variable `HLIBSYNTAX_DEFAULT2_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/tools.mk:226: warning: undefined variable `HLIBSYNTAX_DEFAULT3_H_x86_64-apple-darwin'
/Users/pnkfelix/Dev/Mozilla/rust.git/mk/docs.mk:41: warning: undefined variable `NO_DOCS'
Makefile:628: warning: undefined variable `MAKECMDGOALS'
make: Nothing to be done for `all'.

Issue 2:
I encountered this error while building "router" crate.

/Users/.cargo/registry/src/github.com-1ecc6299db9ec823/router-0.0.9/src/router.rs:158:1: 158:45 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait core::marker::MarkerTrait for the type iron::middleware::Handler

/Users/biye/.cargo/registry/src/github.com-1ecc6299db9ec823/router-0.0.9/src/router.rs:158 impl Key for Router { type Value = Params; }

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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/nightly-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:130

stack backtrace:

1: 0x1090eddf7 - sys::backtrace::write::hcdd8cf990b8f0f0e1LC

2: 0x10911bccd - panicking::on_panic::hbbf8c269bccad920HAI

3: 0x10904015e - rt::unwind::begin_unwind_inner::h2f66a36e4dcc3e43iiI

4: 0x1088174ee - rt::unwind::begin_unwind::h4366604798127356786

5: 0x10881749b - diagnostic::SpanHandler::span_bug::h0e21e2a54cd366dbjnB

6: 0x1062d2666 - middle::traits::error_reporting::report_fulfillment_error::h24e2f9dcf11073a7hTN

7: 0x10613ede1 - middle::traits::error_reporting::report_fulfillment_errors::he23632a94223023axSN

8: 0x10567f7c2 - check::vtable::select_all_fcx_obligations_or_error::hded438f3b654ae6bX1b

9: 0x10570b76e - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_item_well_formed::h50d40da11e7554f3mWk

10: 0x105714261 - visit::walk_item::h17483634980229280695

11: 0x105814569 - check_crate::closure.36302

12: 0x10580ea37 - check_crate::hf2047274e19fe4f4bwC

13: 0x10552c2d5 - driver::phase_3_run_analysis_passes::h7ac32f1d1ca0be7dgGa

14: 0x105510a05 - driver::compile_input::haed712778d66caf6Qba

15: 0x1055ce985 - run_compiler::h2df8296b9f7c362fV4b

16: 0x1055cc152 - boxed::F.FnBox::call_box::h8968837061369711197

17: 0x1055cb647 - rt::unwind::try::try_fn::h5695919628988619761

18: 0x1091a5d28 - rust_try_inner

19: 0x1091a5d15 - rust_try

20: 0x1055cb93a - boxed::F.FnBox::call_box::h17367168855684310088

21: 0x1091051fd - sys:🧵:create::thread_start::he0d7c708bf73803bihH

22: 0x7fff8c0a2267 - _pthread_body

23: 0x7fff8c0a21e4 - _pthread_start