Skip to content

internal error: entered unreachable code #63164

Closed
@cazgp

Description

@cazgp

Seems to be something to do with Rocket. Having a get on the internal function is causing the compiler to blow up.

fn moo() {
    #[get("/moo")]
    fn get() -> String {
        "moo".to_string()
    }
}

Version:

rustc 1.38.0-nightly (dddb7fca0 2019-07-30)
binary: rustc
commit-hash: dddb7fca09dc817ba275602b950bb81a9032fb6d
commit-date: 2019-07-30
host: x86_64-unknown-linux-gnu
release: 1.38.0-nightly
LLVM version: 9.0

Stack trace:

thread 'rustc' panicked at 'internal error: entered unreachable code', src/librustc_privacy/lib.rs:767:17
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: rustc::util::common::panic_hook
   7: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:481
   8: std::panicking::begin_panic
   9: <rustc_privacy::EmbargoVisitor as rustc::hir::intravisit::Visitor>::visit_macro_def
  10: rustc_privacy::privacy_access_levels
  11: rustc::ty::query::__query_compute::privacy_access_levels
  12: rustc::dep_graph::graph::DepGraph::with_task_impl
  13: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  14: rustc::util::common::time
  15: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  16: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:80
  17: rustc_interface::passes::analysis::{{closure}}
  18: rustc::util::common::time
  19: rustc_interface::passes::analysis
  20: rustc::ty::query::__query_compute::analysis
  21: rustc::dep_graph::graph::DepGraph::with_task_impl
  22: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  23: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  24: rustc_interface::passes::create_global_ctxt::{{closure}}
  25: rustc_interface::interface::run_compiler_in_existing_thread_pool
  26: std::thread::local::LocalKey<T>::with
  27: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:
#0 [privacy_access_levels] privacy access levels
#1 [analysis] running analysis passes on this crate
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-visibilityArea: Visibility / privacyC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions