Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails on unexpected definition: PrimTy(TyInt(i64)) #38210

Closed
matthew-piziak opened this issue Dec 7, 2016 · 2 comments
Closed

Compilation fails on unexpected definition: PrimTy(TyInt(i64)) #38210

matthew-piziak opened this issue Dec 7, 2016 · 2 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@matthew-piziak
Copy link
Contributor

Contents of Cargo.toml:

[package]
name = "baz"
version = "0.1.0"
authors = ["Matthew Piziak <matthew.piziak@gmail.com>"]

Contents of main.rs:

mod foo;

fn main() {
    let task = foo::Foo::new("Foo", 1);
}

Contents of foo.rs:

pub struct Foo {
    bar: i64,
}

impl Foo {
    pub fn new(bar: i64) -> Self {
        Foo {
            bar: i64,
        }
    }
}

Output of rustc --version --verbose:

rustc 1.15.0-nightly (28d6623bc 2016-12-03)
binary: rustc
commit-hash: 28d6623bccf8f7e9a40a47895df75dd9ef2619da
commit-date: 2016-12-03
host: x86_64-unknown-linux-gnu
release: 1.15.0-nightly
LLVM version: 3.9

Output of cargo build --verbose:

Blocking waiting for file lock on build directory
Compiling baz v0.1.0 (file:///home/matt/baz)
Running `rustc --crate-name baz src/main.rs --crate-type bin -g -C metadata=f80dbc3cb278c435 -C extra-filename=-f80dbc3cb278c435 --out-dir /home/matt/baz/target/debug/deps --emit=dep-info,link -L dependency=/home/matt/baz/target/debug/deps`
error: internal compiler error: ../src/librustc_typeck/check/mod.rs:4396: unexpected definition: PrimTy(TyInt(i64))

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<Any>', ../src/librustc_errors/lib.rs:423
stack backtrace:
1:     0x7fc6e390c63a - std::sys::imp::backtrace::tracing::imp::write::hbea47d9dd19b523c
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2:     0x7fc6e391b50f - std::panicking::default_hook::{{closure}}::h6875a2976258b020
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:247
3:     0x7fc6e391b0ad - std::panicking::default_hook::h88ffbc5922643264
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:257
4:     0x7fc6e391b9b7 - std::panicking::rust_panic_with_hook::hc790e47d4ecc86cd
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:451
5:     0x7fc6dc39e68a - std::panicking::begin_panic::h264cdc75d51b518b
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:413
6:     0x7fc6dc3b13ad - rustc_errors::Handler::bug::h620f7270292f0095
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_errors/lib.rs:423
7:     0x7fc6e0ccd8d1 - rustc::session::opt_span_bug_fmt::{{closure}}::h4a9b70c3df8b4b3a
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/session/mod.rs:783
8:     0x7fc6e0ccd6ee - rustc::session::opt_span_bug_fmt::h7d83586c6e2c7ae6
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1062
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/session/mod.rs:779
9:     0x7fc6e0ccd352 - rustc::session::bug_fmt::he2d2f00a4afa9d1e
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/session/mod.rs:763
10:     0x7fc6e13a59b9 - rustc_typeck::check::FnCtxt::instantiate_value_path::h4229ac945aebfa55
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:4396
11:     0x7fc6e1393cff - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3630
12:     0x7fc6e1392a32 - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3460
13:     0x7fc6e1390b5c - rustc_typeck::check::FnCtxt::check_expr_struct_fields::h834dbf10da936de9
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2801
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2795
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2788
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3270
14:     0x7fc6e1395868 - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3408
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3953
15:     0x7fc6e1392a32 - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3460
16:     0x7fc6e13a46ae - rustc_typeck::check::FnCtxt::check_block_with_expected::he90dd72b6855e5e4
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2801
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:4208
17:     0x7fc6e1392f02 - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3810
18:     0x7fc6e1392a32 - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:3460
19:     0x7fc6e1379c4d - rustc_typeck::check::check_fn::h96bd864b4d4fc711
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2801
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2795
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:2788
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:824
20:     0x7fc6e137887b - rustc_typeck::check::check_bare_fn::h87386ea43f4e272e
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:661
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:502
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/infer/mod.rs:441
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1033
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/thread/local.rs:245
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1030
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:846
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/infer/mod.rs:441
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:502
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:651
21:     0x7fc6e137b5ec - rustc_typeck::check::check_item_body::h1e039ede2f960fb9
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:938
22:     0x7fc6e13760cd - rustc_typeck::check::check_item_bodies::hd22adb7703cc56d7
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:565
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/dep_graph/visit.rs:45
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/hir/mod.rs:456
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/dep_graph/visit.rs:67
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/mod.rs:2681
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:591
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/session/mod.rs:232
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/check/mod.rs:589
23:     0x7fc6e13e1a92 - rustc_typeck::check_crate::h92f6bdfe03b6afba
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/lib.rs:350
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/util/common.rs:34
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_typeck/lib.rs:350
24:     0x7fc6e3cc2731 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hd97ec26bf3a98036
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/driver.rs:896
25:     0x7fc6e3cab368 - rustc_driver::driver::phase_3_run_analysis_passes::h6d446abb74c09795
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1033
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/thread/local.rs:245
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1030
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1017
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/thread/local.rs:245
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:1014
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc/ty/context.rs:782
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/driver.rs:866
26:     0x7fc6e3c9b112 - rustc_driver::driver::compile_input::h8e119234b60571d5
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/driver.rs:172
27:     0x7fc6e3ce1018 - rustc_driver::run_compiler::h57c4f233cd1a0c04
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/lib.rs:221
28:     0x7fc6e3bfb7a8 - std::panicking::try::do_call::hf679f17bf3b43b0b
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/lib.rs:1117
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/lib.rs:137
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/librustc_driver/lib.rs:1051
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:295
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:356
29:     0x7fc6e3925efa - __rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libpanic_unwind/lib.rs:97
30:     0x7fc6e3c1e298 - <F as alloc::boxed::FnBox<A>>::call_box::h21b5b32059700da6
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:332
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:351
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/thread/mod.rs:287
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/liballoc/boxed.rs:595
31:     0x7fc6e391a374 - std::sys::imp::thread::Thread::new::thread_start::h8084b1107992ae5b
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/liballoc/boxed.rs:605
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/sys_common/thread.rs:21
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/sys/unix/thread.rs:84
32:     0x7fc6dbb4a453 - start_thread
33:     0x7fc6e35e17de - __GI___clone
34:                0x0 - <unknown>

error: Could not compile `baz`.

Caused by:
process didn't exit successfully: `rustc --crate-name baz src/main.rs --crate-type bin -g -C metadata=f80dbc3cb278c435 -C extra-filename=-f80dbc3cb278c435 --out-dir /home/matt/baz/target/debug/deps --emit=dep-info,link -L dependency=/home/matt/baz/target/debug/deps` (exit code: 101)
@sfackler sfackler added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 7, 2016
@petrochenkov
Copy link
Contributor

Duplicate of #38155, fixed in #38154

@matthew-piziak
Copy link
Contributor Author

@petrochenkov Thank you. Closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants