Skip to content

Instantly share code, notes, and snippets.

@pnkfelix
Last active June 5, 2018 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pnkfelix/e3e27cdfa0f536e6334ffa5e1edd199b to your computer and use it in GitHub Desktop.
Save pnkfelix/e3e27cdfa0f536e6334ffa5e1edd199b to your computer and use it in GitHub Desktop.
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs
index 58b966e8ea..f95d5e235a 100644
--- a/src/librustc/mir/mod.rs
+++ b/src/librustc/mir/mod.rs
@@ -492,7 +492,7 @@ pub enum LocalKind {
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
pub struct VarBindingForm {
pub binding_mode: BindingMode,
- pub opt_ty_span: Option<Span>,
+ pub opt_ty_info: Option<(hir::HirId, Span)>,
}
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
@@ -503,7 +503,7 @@ pub enum BindingForm {
CloneTypeFoldableAndLiftImpls! { BindingForm, hir::ImplicitSelfBinding, }
-impl_stable_hash_for!(struct self::VarBindingForm { binding_mode, opt_ty_span });
+impl_stable_hash_for!(struct self::VarBindingForm { binding_mode, opt_ty_info });
impl_stable_hash_for!(enum self::BindingForm { Var(binding), ImplicitSelf(binding) });
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index 967f14bb0d..e26279c742 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -1797,7 +1797,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
// (such variables are simply not mutable).
if let Some(mir::BindingForm::Var(mir::VarBindingForm {
binding_mode: ty::BindingMode::BindByValue(_),
- opt_ty_span: _,
+ opt_ty_info: _,
})) = self.mir.local_decls[*local].is_user_variable {
true
} else {
@@ -1840,7 +1840,11 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
// if this is a variable binding with an explicit type,
// try to highlight that for the suggestion.
Some(mir::BindingForm::Var(mir::VarBindingForm {
- opt_ty_span: Some(ty_span), .. })) => ty_span,
+ opt_ty_info: Some((_hir_id, ty_span)), .. })) =>
+ {
+ // tcx.hir.span(tcx.hir.hir_to_node_id(hir_id))
+ ty_span
+ }
// otherwise, just highlight the variable identifier
_ => local_decl.source_info.span,
@@ -1875,7 +1879,11 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
// if this is a variable binding with an explicit type,
// try to highlight that for the suggestion.
mir::BindingForm::Var(mir::VarBindingForm {
- opt_ty_span: Some(ty_span), .. }) => ty_span,
+ opt_ty_info: Some((_hir_id, ty_span)), .. }) =>
+ {
+ // tcx.hir.span(tcx.hir.hir_to_node_id(hir_id))
+ ty_span
+ }
// otherwise, just highlight the variable identifier
_ => local_decl.source_info.span,
};
failures:
---- [compile-fail] compile-fail/dep-graph-caller-callee.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-caller-callee.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-caller-callee/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-caller-callee/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 12 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-caller-callee.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- [compile-fail] compile-fail/dep-graph-assoc-type-codegen.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-assoc-type-codegen.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-assoc-type-codegen/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-assoc-type-codegen/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 17 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-assoc-type-codegen.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/dep-graph-trait-impl-two-traits-same-method.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl-two-traits-same-method/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl-two-traits-same-method/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 22 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-trait-impl-two-traits-same-method.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/dep-graph-struct-signature.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-struct-signature.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-struct-signature/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-struct-signature/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 24 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-struct-signature.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/dep-graph-trait-impl-two-traits.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-trait-impl-two-traits.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl-two-traits/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl-two-traits/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 22 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-trait-impl-two-traits.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/dep-graph-trait-impl.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-trait-impl.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 20 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-trait-impl.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/dep-graph-type-alias.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-type-alias.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-type-alias/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-type-alias/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 14 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-type-alias.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/dep-graph-variance-alias.rs stdout ----
error: compiler panicked
status: exit code: 101
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-variance-alias.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-variance-alias/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-variance-alias/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'index out of bounds: the len is 7 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
------------------------------------------
thread '[compile-fail] compile-fail/dep-graph-variance-alias.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
---- [compile-fail] compile-fail/huge-enum.rs stdout ----
error: Error: expected failure status (Some(101)) but received status None.
status: signal: 11
command: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/huge-enum.rs" "--target=x86_64-unknown-linux-gnu" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/huge-enum/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/huge-enum/auxiliary" "-A" "unused"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
error: the type `std::option::Option<[u32; 35184372088831]>` is too big for the current architecture
error: aborting due to previous error
------------------------------------------
thread '[compile-fail] compile-fail/huge-enum.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3053:9
failures:
[compile-fail] compile-fail/dep-graph-assoc-type-codegen.rs
[compile-fail] compile-fail/dep-graph-caller-callee.rs
[compile-fail] compile-fail/dep-graph-struct-signature.rs
[compile-fail] compile-fail/dep-graph-trait-impl-two-traits-same-method.rs
[compile-fail] compile-fail/dep-graph-trait-impl-two-traits.rs
[compile-fail] compile-fail/dep-graph-trait-impl.rs
[compile-fail] compile-fail/dep-graph-type-alias.rs
[compile-fail] compile-fail/dep-graph-variance-alias.rs
[compile-fail] compile-fail/huge-enum.rs
test result: FAILED. 2396 passed; 9 failed; 15 ignored; 0 measured; 0 filtered out
thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
command did not execute successfully: "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/lib" "--run-lib-path" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "--src-base" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail" "--build-base" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage1-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -Zunstable-options " "--target-rustcflags" "-Crpath -Zunstable-options -Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python" "--lldb-python" "/usr/bin/python" "--gdb" "/usr/bin/gdb" "--llvm-version" "6.0.1\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" ""
expected success, got: exit code: 101
failed to run: /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/bootstrap/debug/bootstrap test --stage 1 --incremental src/test/ui src/test/compile-fail src/test/run-pass src/test/mir-opt
Build completed unsuccessfully in 0:04:37
real 4m37.064s
user 29m16.961s
sys 2m19.696s
Compilation exited abnormally with code 1 at Tue Jun 5 20:13:48
23-59-23 rust-diagnostics/objdir-dbgopt (git:nll-diagnostics-revise-check-access-permissions) [ERROR#1] %
RUST_BACKTRACE=1 "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl-two-traits-same-method/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "query-dep-graph" "-L" "/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/compile-fail/dep-graph-trait-impl-two-traits-same-method/auxiliary" "-A" "unused"
thread 'main' panicked at 'index out of bounds: the len is 22 but the index is 4434', /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051:10
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:211
3: std::panicking::default_hook
at libstd/panicking.rs:227
4: rustc::util::common::panic_hook
at librustc/util/common.rs:54
5: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:467
6: std::panicking::begin_panic_fmt
at libstd/panicking.rs:350
7: rust_begin_unwind
at libstd/panicking.rs:328
8: core::panicking::panic_fmt
at libcore/panicking.rs:71
9: core::panicking::panic_bounds_check
at libcore/panicking.rs:58
10: rustc::ich::hcx::<impl rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'a>> for rustc::hir::HirId>::hash_stable
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:2051
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libcore/slice/mod.rs:1947
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/liballoc/vec.rs:1705
at librustc/hir/map/definitions.rs:88
at librustc/hir/map/definitions.rs:442
at librustc/ich/hcx.rs:158
at librustc/ich/hcx.rs:259
11: <(T1, T2) as rustc_data_structures::stable_hasher::HashStable<CTX>>::hash_stable
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc_data_structures/stable_hasher.rs:261
12: <rustc_data_structures::indexed_vec::IndexVec<I, T> as rustc_data_structures::stable_hasher::HashStable<CTX>>::hash_stable
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc_data_structures/stable_hasher.rs:375
at librustc/macros.rs:104
at librustc/macros.rs:87
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc_data_structures/stable_hasher.rs:375
at librustc/macros.rs:104
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc_data_structures/stable_hasher.rs:426
13: <rustc::mir::Mir<'tcx> as rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'a>>>::hash_stable
at librustc/macros.rs:104
14: rustc::dep_graph::graph::DepGraph::with_task_impl
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc_data_structures/stable_hasher.rs:405
at librustc/dep_graph/graph.rs:286
15: rustc::dep_graph::graph::DepGraph::with_task
at librustc/dep_graph/graph.rs:207
16: rustc::ty::context::tls::set_tlv
at librustc/ty/maps/plumbing.rs:534
at librustc/ty/maps/plumbing.rs:204
at librustc/ty/context.rs:1799
at librustc/ty/context.rs:1740
17: rustc::ty::context::tls::with_context_opt
at librustc/ty/context.rs:1798
at librustc/ty/maps/plumbing.rs:203
at librustc/ty/context.rs:1860
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1835
18: rustc::ty::context::tls::with_related_context
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1855
19: <rustc::ty::maps::plumbing::JobOwner<'a, 'tcx, Q>>::start
at librustc/ty/maps/plumbing.rs:193
20: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
at librustc/ty/maps/plumbing.rs:527
21: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_get_with
at librustc/ty/maps/plumbing.rs:413
22: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
at librustc/ty/maps/plumbing.rs:603
at librustc/ty/maps/plumbing.rs:610
23: rustc::ty::maps::TyCtxtAt::optimized_mir
at librustc/ty/maps/plumbing.rs:793
24: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::instance_mir
at librustc/ty/maps/plumbing.rs:786
at librustc/ty/mod.rs:2629
25: rustc_mir::monomorphize::collector::collect_items_rec
at librustc_mir/monomorphize/collector.rs:1179
at librustc_mir/monomorphize/collector.rs:405
26: rustc_mir::monomorphize::collector::collect_crate_mono_items
at librustc_mir/monomorphize/collector.rs:309
27: rustc::util::common::time_ext
at librustc_codegen_llvm/base.rs:995
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/util/common.rs:166
28: rustc::util::common::time
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/util/common.rs:160
29: rustc_codegen_llvm::base::collect_and_partition_mono_items
at librustc_codegen_llvm/base.rs:994
30: rustc::ty::maps::__query_compute::collect_and_partition_mono_items
at librustc/ty/maps/plumbing.rs:739
at librustc/ty/maps/plumbing.rs:710
31: rustc::ty::maps::<impl rustc::ty::maps::config::QueryConfig<'tcx> for rustc::ty::maps::queries::collect_and_partition_mono_items<'tcx>>::compute
at librustc/ty/maps/plumbing.rs:737
32: rustc::ty::context::tls::with_context_opt
at librustc/dep_graph/graph.rs:274
at librustc/ty/context.rs:1799
at librustc/ty/context.rs:1740
at librustc/ty/context.rs:1798
at librustc/dep_graph/graph.rs:273
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1835
33: rustc::ty::context::tls::with_context
at librustc/ty/context.rs:1844
34: rustc::dep_graph::graph::DepGraph::with_task_impl
at librustc/dep_graph/graph.rs:267
35: rustc::dep_graph::graph::DepGraph::with_eval_always_task
at librustc/dep_graph/graph.rs:391
36: rustc::ty::context::tls::set_tlv
at librustc/ty/maps/plumbing.rs:529
at librustc/ty/maps/plumbing.rs:204
at librustc/ty/context.rs:1799
at librustc/ty/context.rs:1740
37: rustc::ty::context::tls::with_context_opt
at librustc/ty/context.rs:1798
at librustc/ty/maps/plumbing.rs:203
at librustc/ty/context.rs:1860
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1835
38: rustc::ty::context::tls::with_related_context
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1855
39: <rustc::ty::maps::plumbing::JobOwner<'a, 'tcx, Q>>::start
at librustc/ty/maps/plumbing.rs:193
40: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
at librustc/ty/maps/plumbing.rs:527
41: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_get_with
at librustc/ty/maps/plumbing.rs:413
42: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_get_query
at librustc/ty/maps/plumbing.rs:603
43: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
at librustc/ty/maps/plumbing.rs:610
44: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::collect_and_partition_mono_items
at librustc/ty/maps/plumbing.rs:786
45: rustc_codegen_llvm::base::codegen_crate
at librustc_codegen_llvm/base.rs:784
46: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
at librustc_codegen_llvm/lib.rs:204
47: rustc::util::common::time_ext
at librustc_driver/driver.rs:1247
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/util/common.rs:166
48: rustc::util::common::time
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/util/common.rs:160
49: rustc_driver::driver::phase_4_codegen
at librustc_driver/driver.rs:1247
50: rustc_driver::driver::compile_input::{{closure}}
at librustc_driver/driver.rs:317
51: rustc::ty::context::tls::set_tlv
at librustc_driver/driver.rs:1231
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1822
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1799
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1740
52: rustc::ty::context::tls::enter_context
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1798
53: <std::thread::local::LocalKey<T>>::try_with
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1821
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1788
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/thread/local.rs:294
54: <std::thread::local::LocalKey<T>>::try_with
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/thread/local.rs:248
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1780
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/thread/local.rs:294
55: <std::thread::local::LocalKey<T>>::with
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/thread/local.rs:248
56: rustc::ty::context::tls::enter_global
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1772
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1810
57: rustc::ty::context::TyCtxt::create_and_enter
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/librustc/ty/context.rs:1182
58: rustc_driver::driver::phase_3_run_analysis_passes
at librustc_driver/driver.rs:1141
59: rustc_driver::driver::compile_input
at librustc_driver/driver.rs:276
60: rustc_driver::run_compiler_with_pool
at librustc_driver/lib.rs:551
61: rustc_driver::driver::spawn_thread_pool
at librustc_driver/lib.rs:472
at librustc_driver/driver.rs:72
62: <scoped_tls::ScopedKey<T>>::set
at librustc_driver/lib.rs:471
at /home/pnkfelix/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.1/src/lib.rs:155
63: <scoped_tls::ScopedKey<T>>::set
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libsyntax/lib.rs:96
at /home/pnkfelix/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.1/src/lib.rs:155
64: syntax::with_globals
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libsyntax/lib.rs:95
65: rustc_driver::run_compiler
at librustc_driver/lib.rs:462
66: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at librustc_driver/lib.rs:1695
at librustc_driver/lib.rs:180
at librustc_driver/lib.rs:1609
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/panic.rs:305
67: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
68: std::panicking::try
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/panicking.rs:289
69: rustc_driver::in_rustc_thread
at librustc_driver/lib.rs:1541
70: rustc_driver::monitor
at librustc_driver/lib.rs:1608
71: rustc_driver::run
at librustc_driver/lib.rs:179
72: rustc_driver::main
at librustc_driver/lib.rs:1688
73: std::rt::lang_start::{{closure}}
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/rt.rs:74
74: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:310
75: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
76: std::panicking::try
at libstd/panicking.rs:289
77: std::panic::catch_unwind
at libstd/panic.rs:374
78: std::rt::lang_start_internal
at libstd/rt.rs:58
79: std::rt::lang_start
at /home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/libstd/rt.rs:74
80: __libc_start_main
81: _start
query stack during panic:
{"message":"#0 [optimized_mir] processing `std::rt::lang_start`","code":null,"level":"","spans":[{"file_name":"/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"#0 [optimized_mir] processing `std::rt::lang_start`\n"}
{"message":"#1 [collect_and_partition_mono_items] collect_and_partition_mono_items","code":null,"level":"","spans":[{"file_name":"/home/pnkfelix/Dev/Mozilla/nll-diagnostics/rust-diagnostics/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"#1 [collect_and_partition_mono_items] collect_and_partition_mono_items\n"}
end of query stack
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: rustc 1.28.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z ui-testing -Z unstable-options -Z query-dep-graph -C prefer-dynamic -C rpath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment