You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add a use self statement to my main.rs file, the compiler panics.
This code:
useself;fnmain(){}
The compiler properly prints the error about using self in a use statement that doesn't use {}, but it also panics with this message:
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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:68
at libstd/sys_common/backtrace.rs:57
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:380
3: std::panicking::default_hook
at libstd/panicking.rs:390
4: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:576
5: std::panicking::begin_panic
at libstd/panicking.rs:537
6: std::panicking::begin_panic_fmt
at libstd/panicking.rs:521
7: rust_begin_unwind
at libstd/panicking.rs:497
8: core::panicking::panic_fmt
at libcore/panicking.rs:71
9: core::panicking::panic
at libcore/panicking.rs:51
10: rustc::hir::lowering::LoweringContext::lower_use_tree
11: rustc::hir::lowering::LoweringContext::lower_item
12: <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer<'lcx, 'interner> as syntax::visit::Visitor<'lcx>>::visit_item
13: rustc::hir::lowering::lower_crate
14: rustc::util::common::time
15: rustc_driver::driver::compile_input
16: rustc_driver::run_compiler
When I add a
use self
statement to my main.rs file, the compiler panics.This code:
The compiler properly prints the error about using self in a use statement that doesn't use
{}
, but it also panics with this message:Version:
The text was updated successfully, but these errors were encountered: