Issue 1:
Can't find an exact match for the issue, so create a new one here. Feel free to close it as a duplicate if it's the case.

/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sync/mutex.rs:177:37: 180:2 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 9643, node: ExprStruct(Path { span: Span { lo: BytePos(4553805), hi: BytePos(4553816), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticMutex#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(1772893), hi: BytePos(1772897), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 9644, node: ExprPath(None, Path { span: Span { lo: BytePos(4553829), hi: BytePos(4553844), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: MUTEX_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4553829), hi: BytePos(4553844), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4553823), hi: BytePos(4553844), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(1772920), hi: BytePos(1772926), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 9645, node: ExprPath(None, Path { span: Span { lo: BytePos(4553858), hi: BytePos(4553875), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4553858), hi: BytePos(4553875), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4553850), hi: BytePos(4553875), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(4553805), hi: BytePos(4553878), expn_id: ExpnId(4294967295) } })

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', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129

stack backtrace:

1: 0x7f0c71ceef6f - sys::backtrace::write::h2f046b875b210aadOBA

2: 0x7f0c71d19c82 - panicking::on_panic::h792ac47fb8c07faehHJ

3: 0x7f0c71c4ef2a - rt::unwind::begin_unwind_inner::hbffac672008352c8knJ

4: 0x7f0c6f08b84d - rt::unwind::begin_unwind::h7782663023585067018

5: 0x7f0c6f08b7f3 - diagnostic::SpanHandler::span_bug::h2cdd5e3b5b05e8f800D

6: 0x7f0c6f964d03 - session::Session::span_bug::hae37e3dbc1cfddbalVp

7: 0x7f0c7147c6bc - trans::debuginfo::scope_metadata::h3b34d6a00870eb16ClE

8: 0x7f0c7138e568 - trans::debuginfo::set_source_location::h9f5b090c644fcb73vPD

9: 0x7f0c71342f32 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

10: 0x7f0c713431f9 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

11: 0x7f0c713a57df - trans::expr::trans_uniq_expr::hd6a8aea14a08d77bQmj

12: 0x7f0c713a644f - trans::expr::trans_unary::h35488c79f6cf1ec15ij

13: 0x7f0c7139096e - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h

14: 0x7f0c71343507 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

15: 0x7f0c713c3859 - trans::expr::trans_adt::h66e672e44790aeeca9i

16: 0x7f0c713c630f - trans::expr::trans_struct::closure.42092

17: 0x7f0c713b0176 - trans::expr::trans_struct::ha16472c37d95c70064i

18: 0x7f0c7139269d - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

19: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

20: 0x7f0c71344317 - trans::controlflow::trans_block::h4b526e186a057814x7d

21: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt

22: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt

23: 0x7f0c7132e3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud

24: 0x7f0c71373f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng

25: 0x7f0c7137252e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg

26: 0x7f0c7136f97d - trans::callee::trans::h1b831ba8a404e3ach1f

27: 0x7f0c713860eb - trans::callee::trans_call_inner::h15453122340747063984

28: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

29: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

30: 0x7f0c713c3859 - trans::expr::trans_adt::h66e672e44790aeeca9i

31: 0x7f0c713c630f - trans::expr::trans_struct::closure.42092

32: 0x7f0c713b0176 - trans::expr::trans_struct::ha16472c37d95c70064i

33: 0x7f0c7139269d - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

34: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

35: 0x7f0c71344317 - trans::controlflow::trans_block::h4b526e186a057814x7d

36: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt

37: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt

38: 0x7f0c7132e3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud

39: 0x7f0c71373f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng

40: 0x7f0c7137252e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg

41: 0x7f0c7136f97d - trans::callee::trans::h1b831ba8a404e3ach1f

42: 0x7f0c713860eb - trans::callee::trans_call_inner::h15453122340747063984

43: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

44: 0x7f0c713907c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h

45: 0x7f0c71344c48 - trans::expr::trans::h4730571ef226d1543vh

46: 0x7f0c71381b43 - trans::callee::trans_args::hfa9ae7de71a462d8I3g

47: 0x7f0c71386fd0 - trans::callee::trans_call_inner::h15453122340747063984

48: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

49: 0x7f0c713907c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h

50: 0x7f0c71344c48 - trans::expr::trans::h4730571ef226d1543vh

51: 0x7f0c71381b43 - trans::callee::trans_args::hfa9ae7de71a462d8I3g

52: 0x7f0c71386fd0 - trans::callee::trans_call_inner::h15453122340747063984

53: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

54: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph

55: 0x7f0c71454df7 - trans::_match::mk_binding_alloca::h16286962064436778167

56: 0x7f0c713428ed - trans::base::init_local::he5827bc6a6f1a71eyBs

57: 0x7f0c71343ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d

58: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt

59: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt

60: 0x7f0c7132df76 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud

61: 0x7f0c71373f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng

62: 0x7f0c7137252e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg

63: 0x7f0c7136f97d - trans::callee::trans::h1b831ba8a404e3ach1f

64: 0x7f0c713860eb - trans::callee::trans_call_inner::h15453122340747063984

65: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi

66: 0x7f0c713907c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h

67: 0x7f0c71344c48 - trans::expr::trans::h4730571ef226d1543vh

68: 0x7f0c713429c2 - trans::base::init_local::he5827bc6a6f1a71eyBs

69: 0x7f0c71343ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d

70: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt

71: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt

72: 0x7f0c713286e1 - trans::base::trans_item::h2af153dd6f7fd52bRVt

73: 0x7f0c7142474c - trans::base::trans_crate::h5cb53f6b3e2377862Ru

74: 0x7f0c72327613 - driver::phase_4_translate_to_llvm::h60575195b9fa298dENa

75: 0x7f0c7230305b - driver::compile_input::h9772b425fd1776fdNba

76: 0x7f0c723c7697 - run_compiler::h17c28dbe4dd58e3bV5b

77: 0x7f0c723c52c9 - thunk::F.Invoke<A, R>::invoke::h3041729087284544127

78: 0x7f0c723c3f40 - rt::unwind::try::try_fn::h11775082019993619070

79: 0x7f0c71d89e38 - rust_try_inner

80: 0x7f0c71d89e25 - rust_try

81: 0x7f0c723c46df - thunk::F.Invoke<A, R>::invoke::h10556879288050829464

82: 0x7f0c71d049b5 - sys:🧵:thread_start::hfe8c2cac3ec4afcdr8E

83: 0x7f0c6bb64181 - start_thread

84: 0x7f0c718bf47c - __clone

85: 0x0 -

Could not compile rusttest.

Caused by:

Process didn't exit successfully: rustc src/main.rs --crate-name rusttest --crate-type bin -g --out-dir /home/wlu/projects/rusttest/target --emit=dep-info,link -L dependency=/home/wlu/projects/rusttest/target -L dependency=/home/wlu/projects/rusttest/target/deps --extern time=/home/wlu/projects/rusttest/target/deps/libtime-f5c2f62bb1bdf976.rlib -L native=/home/wlu/projects/rusttest/target/build/time-f5c2f62bb1bdf976/out (exit code: 101)

rustc 1.0.0-nightly (b0746ff 2015-03-05) (built 2015-03-06)

ubuntu 14.04 x86_64

Issue 2:
I was looking for a collection of environment variables that rustc honours but was unable to find a definitive list. There are a few mentions of variables such as RUSTFLAGS, RUST_THREADS and RUST_BACKTRACE on google but none of them are documented in rustc(1)

Would it be possible to add these to the manual for future reference under an ENVIRONMENT section much like clang and gcc?