Skip to content

Compile error #109943

Closed
Closed
@sjeohp

Description

@sjeohp

Code

#![feature(rustc_attrs)]

use std::time::{Duration, Instant};
use tokio::prelude::*;
use tokio::timer::*;

#[rustc_mir(borrowck_graphviz_postflow="suffix.dot")]
fn main() {
    let start = Instant::now();
    tokio::run({
        Interval::new(start, Duration::from_secs(2))
            .map_err(|e| panic!("timer failed; err={:?}", e))
            .map(move |i| (0, i.duration_since(start).as_secs()))
            .select(
                Interval::new(Instant::now() + Duration::from_secs(1), Duration::from_secs(2))
                    .map_err(|e| panic!("timer failed; err={:?}", e))
                    .map(move |i| ((1, i.duration_since(start).as_secs()))),
            )
            .take_while(move |(_, i)| Ok(*i < 5))
            .for_each(move |(stream_idx, i)| {
                println!("hello world at {:?} on stream {}", i, stream_idx);
                Ok(())
            })
    })
}

Meta

rustc 1.70.0-nightly (f15f0ea73 2023-03-04) running on x86_64-unknown-linux-gnu

Error output

error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed but no error emitted; use `DelayDm` for lints or `with_no_trimmed_paths` for debugging

Backtrace

  = note: delayed at    0: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: <rustc_query_impl::queries::trimmed_def_paths as rustc_query_system::query::config::QueryConfig<rustc_query_impl::plumbing::QueryCtxt>>::compute
             3: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_query_impl::plumbing::QueryCtxt, (), &rustc_data_structures::unord::UnordSet<rustc_span::def_id::DefId>>::{closure#0}, &rustc_data_structures::unord::UnordSet<rustc_span::def_id::DefId>>
             4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
             5: rustc_query_system::query::plumbing::force_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt, rustc_middle::dep_graph::dep_node::DepKind>
             6: rustc_query_impl::plumbing::force_from_dep_node::<rustc_query_impl::queries::trimmed_def_paths>
             7: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
             8: rustc_query_system::query::plumbing::ensure_must_run::<rustc_query_impl::queries::mir_borrowck, rustc_query_impl::plumbing::QueryCtxt>
             9: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_interface::passes::analysis::{closure#2}::{closure#0}>::{closure#0}>
            10: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#2}>
            11: rustc_interface::passes::analysis
            12: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            13: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
            14: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            15: rustc_span::with_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
            16: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            17: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            18: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/f15f0ea73972786e426732c5b92ba9a904b866c4/library/alloc/src/boxed.rs:1987:9
            19: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/f15f0ea73972786e426732c5b92ba9a904b866c4/library/alloc/src/boxed.rs:1987:9
            20: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/f15f0ea73972786e426732c5b92ba9a904b866c4/library/std/src/sys/unix/thread.rs:108:17
            21: start_thread
            22: clone

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-internal-featuresThis issue requires the use of internal features.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions