Ask questionssupplied instant is later than self

<!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. -->


<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. -->

rustc --version --verbose:

rustc 1.52.1 (9bc8c42bb 2021-05-09)
binary: rustc
commit-hash: 9bc8c42bb2f19e745a63f3445f1ac248fb015e53
commit-date: 2021-05-09
host: x86_64-unknown-linux-gnu
release: 1.52.1
LLVM version: 12.0.0

Error output

thread 'rustc' panicked at 'supplied instant is later than self', library/std/src/
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report:

note: rustc 1.52.1 (9bc8c42bb 2021-05-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

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

<!-- Include a backtrace in the code block by setting RUST_BACKTRACE=1 in your environment. E.g. RUST_BACKTRACE=1 cargo build. --> <details><summary><strong>Backtrace</strong></summary> <p>

0: rust_begin_unwind
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/
   1: core::panicking::panic_fmt
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/
   2: core::option::expect_failed
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/
   3: core::option::Option<T>::expect
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/
   4: std::time::Instant::duration_since
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/
   5: <std::time::Instant as core::ops::arith::Sub>::sub
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/
   6: std::time::Instant::elapsed
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/
   7: rustc_codegen_llvm::base::compile_codegen_unit
   8: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
   9: rustc_interface::passes::QueryContext::enter
  10: rustc_interface::queries::Queries::ongoing_codegen
  11: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  12: rustc_span::with_source_map
  13: rustc_interface::interface::create_compiler_and_run
  14: scoped_tls::ScopedKey<T>::set

</p> </details>

This might be an LLVM bug, as it never occurs on Windows and occurs in every rust program that I've compiled on Linux, not when compiling, but running it.


Answer questions fee1-dead

Can you check your system clock? That might be the issue. Also did you use RUST_BACKTRACE=full to get the full backtrace?

Github User Rank List