Closed
Description
rustc --version; cat lib.rs; env RUST_BACKTRACE=1 rustc --emit asm lib.rs --crate-type dylib -O --target thumbv7em-none-eabihf
rustc 1.28.0-nightly (cb20f68d0 2018-05-21)
#![no_std]
pub fn pete() -> u32 {
2
}
warning: dropping unsupported crate type `dylib` for target `thumbv7em-none-eabihf`
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21
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
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
at libcore/panicking.rs:51
10: rustc_codegen_llvm::base::write_metadata
11: rustc::util::common::time
12: rustc_codegen_llvm::base::codegen_crate
13: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
14: rustc::util::common::time
15: rustc_driver::driver::phase_4_codegen
16: rustc_driver::driver::compile_input::{{closure}}
17: rustc::ty::context::tls::enter_context
18: <std::thread::local::LocalKey<T>>::with
19: rustc::ty::context::TyCtxt::create_and_enter
20: rustc_driver::driver::compile_input
21: rustc_driver::run_compiler_with_pool
22: syntax::with_globals
23: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
24: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
25: rustc_driver::run
26: rustc_driver::main
27: std::rt::lang_start::{{closure}}
28: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:310
29: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
30: std::rt::lang_start_internal
at libstd/panicking.rs:289
at libstd/panic.rs:374
at libstd/rt.rs:58
31: main
32: __libc_start_main
33: <unknown>
query stack during panic:
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-nightly (cb20f68d0 2018-05-21) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type dylib