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

Rust Language Server panicked at 'Box<Any>', #64667

Closed
smokku opened this issue Sep 21, 2019 · 2 comments
Closed

Rust Language Server panicked at 'Box<Any>', #64667

smokku opened this issue Sep 21, 2019 · 2 comments

Comments

@smokku
Copy link

smokku commented Sep 21, 2019

Using repo https://github.com/amethyst/amethyst-starter-2d.git @ fd8bff9ea61
rustc 1.39.0-nightly (9b9d2aff8 2019-09-19)
cargo 1.39.0-nightly (3596cb86b 2019-09-19)
rls 1.39.0 (d9aa23a 2019-09-15)

I start RUST_BACKTRACE=1 rls --cli in $ .../amethyst-starter-2d and get:

Initializing (look for `progress[done:true]` message)...
> 1: InitializeResult {
    capabilities: ServerCapabilities {
        text_document_sync: Some(
            Kind(
                Incremental,
            ),
        ),
        selection_range_provider: None,
        hover_provider: Some(
            true,
        ),
        completion_provider: Some(
            CompletionOptions {
                resolve_provider: Some(
                    true,
                ),
                trigger_characters: Some(
                    [
                        ".",
                        ":",
                    ],
                ),
            },
        ),
        signature_help_provider: None,
        definition_provider: Some(
            true,
        ),
        type_definition_provider: None,
        implementation_provider: Some(
            Simple(
                true,
            ),
        ),
        references_provider: Some(
            true,
        ),
        document_highlight_provider: Some(
            true,
        ),
        document_symbol_provider: Some(
            true,
        ),
        workspace_symbol_provider: Some(
            true,
        ),
        code_action_provider: Some(
            Simple(
                true,
            ),
        ),
        code_lens_provider: Some(
            CodeLensOptions {
                resolve_provider: Some(
                    false,
                ),
            },
        ),
        document_formatting_provider: Some(
            true,
        ),
        document_range_formatting_provider: Some(
            false,
        ),
        document_on_type_formatting_provider: None,
        rename_provider: Some(
            Simple(
                true,
            ),
        ),
        color_provider: None,
        folding_range_provider: None,
        execute_command_provider: Some(
            ExecuteCommandOptions {
                commands: [
                    "rls.applySuggestion-32479",
                    "rls.deglobImports-32479",
                ],
            },
        ),
        workspace: None,
    },
}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":null,"percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"semver_parser","percentage":null,"title":"Building"}}
...
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"num_derive","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"shred_derive","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"derivative","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"getset","percentage":null,"title":"Building"}}
{"message":"src/librustc/ty/context.rs:211: node type <B>::Item (hir_id=HirId { owner: DefIndex(249), local_id: 15 }) with HirId::owner DefId(0:249 ~ rayon[c7a6]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:241 ~ rayon[c7a6]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0])","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":"error: internal compiler error: src/librustc/ty/context.rs:211: node type <B>::Item (hir_id=HirId { owner: DefIndex(249), local_id: 15 }) with HirId::owner DefId(0:249 ~ rayon[c7a6]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:241 ~ rayon[c7a6]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0])\n\n"}
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:76
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:60
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1030
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:64
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:196
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:210
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  12: std::panicking::begin_panic
  13: rustc_errors::Handler::bug
  14: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  15: rustc::ty::context::tls::with_opt::{{closure}}
  16: rustc::ty::context::tls::with_context_opt
  17: rustc::ty::context::tls::with_opt
  18: rustc::util::bug::opt_span_bug_fmt
  19: rustc::util::bug::bug_fmt
  20: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
  21: rustc::ty::context::tls::with::{{closure}}
  22: rustc::ty::context::tls::with_context::{{closure}}
  23: rustc::ty::context::tls::with_context_opt
  24: rustc::ty::context::tls::with_context
  25: rustc::ty::context::tls::with
  26: rustc::ty::context::TypeckTables::qpath_res
  27: rustc_save_analysis::SaveContext::get_path_res
  28: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  29: rustc_save_analysis::dump_visitor::DumpVisitor::process_path
  30: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  31: rustc_save_analysis::dump_visitor::DumpVisitor::process_method::{{closure}}
  32: rustc_save_analysis::dump_visitor::DumpVisitor::process_method
  33: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  34: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  35: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  36: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod
  37: rustc::dep_graph::graph::DepGraph::with_ignore
  38: rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}
  39: rustc::util::common::time
  40: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  41: rustc_interface::passes::create_global_ctxt::{{closure}}
  42: rustc_interface::interface::run_compiler_in_existing_thread_pool
  43: std::thread::local::LocalKey<T>::with
  44: scoped_tls::ScopedKey<T>::set
  45: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.39.0-nightly (9b9d2aff8 2019-09-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}

Meta

rustc 1.39.0-nightly (9b9d2aff8 2019-09-19)
binary: rustc
commit-hash: 9b9d2aff8de4d499b4ba7ca406e000f8d3754ea7
commit-date: 2019-09-19
host: x86_64-unknown-linux-gnu
release: 1.39.0-nightly
LLVM version: 9.0
cargo 1.39.0-nightly (3596cb86b 2019-09-19)
release: 1.39.0
commit-hash: 3596cb86b2e87dd9b9c1bb90d4a9d73ec2c1512f
commit-date: 2019-09-19
rls 1.39.0 (d9aa23a 2019-09-15)
@smokku
Copy link
Author

smokku commented Sep 21, 2019

cargo build runs fine. Only rls fails.

@jonas-schievink
Copy link
Contributor

Duplicate of #64659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants