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

Internal Compiler Error encountered: delayed_good_path_bugs #97173

Closed
akrsri opened this issue May 19, 2022 · 2 comments
Closed

Internal Compiler Error encountered: delayed_good_path_bugs #97173

akrsri opened this issue May 19, 2022 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@akrsri
Copy link

akrsri commented May 19, 2022

Code

#[allow(unused_macros)]
macro_rules! read_vec {
    ($out:ident as $type:ty) => {
        let mut inner = String::new();
        std::io::stdin.read_line(&mut inner).unwrap();
        let $out = inner
            .trim()
            .split_whitespace()
            .map(|s| s.parse::<$type>().unwrap())
            .collect::<Vec<$type>>();
    };
}

fn main() {
    read_vec!(v as u32);
    println!("{:?}", v);
}

Meta

rustc --version --verbose:

<version>
rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)
binary: rustc
commit-hash: 4c60a0ea5b2385d7400df9db1ad04e96f2a4c154
commit-date: 2022-05-04
host: x86_64-apple-darwin
release: 1.62.0-nightly
LLVM version: 14.0.1

Error output

<output>
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.62.0-nightly (4c60a0ea5 2022-05-04) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `helloworld`
Backtrace

<backtrace>
RUST_BACKTRACE=1 cargo build                                                           ✔ ╱ 18:25:58 
   Compiling helloworld v0.1.0 (/Users/ashutoshsrivastava/workspace/coding/rustlearn/helloworld)
thread 'rustc' panicked at 'DefId::expect_local: `DefId(1:4299 ~ std[1c85]::io::stdio::stdin)` isn't local', /rustc/4c60a0ea5b2385d7400df9db1ad04e96f2a4c154/compiler/rustc_span/src/def_id.rs:283:43
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_typeck::check::fn_ctxt::FnCtxt>::report_method_error
   3: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
   4: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
   5: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
   6: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
   7: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
   8: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
   9: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  10: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  11: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  12: rustc_typeck::check::check::check_fn
  13: <rustc_infer::infer::InferCtxtBuilder>::enter::<&rustc_middle::ty::context::TypeckResults, <rustc_typeck::check::inherited::InheritedBuilder>::enter<rustc_typeck::check::typeck_with_fallback<rustc_typeck::check::typeck::{closure#0}>::{closure#1}, &rustc_middle::ty::context::TypeckResults>::{closure#0}>
  14: rustc_typeck::check::typeck
  15: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
  16: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
  17: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt>
  18: rustc_typeck::check::typeck
  19: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
  20: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
  21: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt>
  22: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_typeck::check::typeck_item_bodies::{closure#0}>
  23: rustc_typeck::check::typeck_item_bodies
  24: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), ()>
  25: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
  26: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
  27: <rustc_session::session::Session>::time::<(), rustc_typeck::check_crate::{closure#7}>
  28: rustc_typeck::check_crate
  29: rustc_interface::passes::analysis
  30: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  31: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
  32: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  33: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  34: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  35: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  36: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  37: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.62.0-nightly (4c60a0ea5 2022-05-04) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

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

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck] type-checking `main::{closure#0}`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: std::backtrace::Backtrace::create
             1: std::backtrace::Backtrace::force_capture
             2: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             3: rustc_middle::ty::print::pretty::trimmed_def_paths
             4: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             5: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::ArenaCache<(), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>
             6: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
             7: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::print_def_path
             8: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_print_type
             9: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_fn_sig
            10: <rustc_middle::ty::sty::FnSig as rustc_middle::ty::print::Print<rustc_middle::ty::print::pretty::FmtPrinter>>::print
            11: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder::<rustc_middle::ty::sty::FnSig>
            12: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_print_type
            13: <rustc_middle::ty::Ty as core::fmt::Display>::fmt
            14: <rustc_infer::infer::InferCtxt>::ty_to_string
            15: <rustc_typeck::check::fn_ctxt::FnCtxt>::report_method_error
            16: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            17: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            19: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            20: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
            21: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
            22: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            23: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
            25: rustc_typeck::check::check::check_fn
            26: <rustc_infer::infer::InferCtxtBuilder>::enter::<&rustc_middle::ty::context::TypeckResults, <rustc_typeck::check::inherited::InheritedBuilder>::enter<rustc_typeck::check::typeck_with_fallback<rustc_typeck::check::typeck::{closure#0}>::{closure#1}, &rustc_middle::ty::context::TypeckResults>::{closure#0}>
            27: rustc_typeck::check::typeck
            28: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
            29: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
            30: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt>
            31: rustc_typeck::check::typeck
            32: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
            33: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
            34: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt>
            35: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_typeck::check::typeck_item_bodies::{closure#0}>
            36: rustc_typeck::check::typeck_item_bodies
            37: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), ()>
            38: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
            39: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
            40: <rustc_session::session::Session>::time::<(), rustc_typeck::check_crate::{closure#7}>
            41: rustc_typeck::check_crate
            42: rustc_interface::passes::analysis
            43: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            44: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
            45: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            46: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            47: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
            48: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
            49: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
            50: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            51: 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_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            52: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            53: std::sys::unix::thread::Thread::new::thread_start
            54: __pthread_start


thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1358:13
stack backtrace:
   0:        0x10ab6c484 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4002c9b8b983a1ee
   1:        0x10abc6f4b - core::fmt::write::h897fbef0358003fc
   2:        0x10ab5e9e8 - std::io::Write::write_fmt::h0e62351fdf824c54
   3:        0x10ab6f83d - std::panicking::default_hook::{{closure}}::h10b8b961361bdf58
   4:        0x10ab6f521 - std::panicking::default_hook::he7af7433d2c751c1
   5:        0x114395c4a - rustc_driver[28e78e568cc8c1ef]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x10ab6ffa6 - std::panicking::rust_panic_with_hook::h79834063599b8c67
   7:        0x118b76b47 - std[1c854bf7cc38c64a]::panicking::begin_panic::<rustc_errors[7aeb3e71f7c7c132]::ExplicitBug>::{closure#0}
   8:        0x118b76af9 - std[1c854bf7cc38c64a]::sys_common::backtrace::__rust_end_short_backtrace::<std[1c854bf7cc38c64a]::panicking::begin_panic<rustc_errors[7aeb3e71f7c7c132]::ExplicitBug>::{closure#0}, !>
   9:        0x118ed1269 - std[1c854bf7cc38c64a]::panicking::begin_panic::<rustc_errors[7aeb3e71f7c7c132]::ExplicitBug>
  10:        0x118b84e09 - std[1c854bf7cc38c64a]::panic::panic_any::<rustc_errors[7aeb3e71f7c7c132]::ExplicitBug>
  11:        0x118b88817 - <rustc_errors[7aeb3e71f7c7c132]::HandlerInner as core[1ba1e5b678f06b4b]::ops::drop::Drop>::drop
  12:        0x1143a8d4a - core[1ba1e5b678f06b4b]::ptr::drop_in_place::<rustc_session[49c7958793b2230f]::parse::ParseSess>
  13:        0x1143af1ba - <alloc[bede3278a67eaef1]::rc::Rc<rustc_session[49c7958793b2230f]::session::Session> as core[1ba1e5b678f06b4b]::ops::drop::Drop>::drop
  14:        0x1143994d2 - core[1ba1e5b678f06b4b]::ptr::drop_in_place::<rustc_interface[34f4a86d89e3f803]::interface::Compiler>
  15:        0x114397883 - rustc_span[affc8dfc6afd6406]::with_source_map::<core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>, rustc_interface[34f4a86d89e3f803]::interface::create_compiler_and_run<core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>, rustc_driver[28e78e568cc8c1ef]::run_compiler::{closure#1}>::{closure#1}>
  16:        0x11434e44a - rustc_interface[34f4a86d89e3f803]::interface::create_compiler_and_run::<core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>, rustc_driver[28e78e568cc8c1ef]::run_compiler::{closure#1}>
  17:        0x11432d535 - <scoped_tls[4d9fb0254ef8a3fb]::ScopedKey<rustc_span[affc8dfc6afd6406]::SessionGlobals>>::set::<rustc_interface[34f4a86d89e3f803]::interface::run_compiler<core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>, rustc_driver[28e78e568cc8c1ef]::run_compiler::{closure#1}>::{closure#0}, core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>>
  18:        0x114359399 - std[1c854bf7cc38c64a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[34f4a86d89e3f803]::util::run_in_thread_pool_with_globals<rustc_interface[34f4a86d89e3f803]::interface::run_compiler<core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>, rustc_driver[28e78e568cc8c1ef]::run_compiler::{closure#1}>::{closure#0}, core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>>::{closure#0}, core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>>
  19:        0x11435a1f1 - <<std[1c854bf7cc38c64a]::thread::Builder>::spawn_unchecked_<rustc_interface[34f4a86d89e3f803]::util::run_in_thread_pool_with_globals<rustc_interface[34f4a86d89e3f803]::interface::run_compiler<core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>, rustc_driver[28e78e568cc8c1ef]::run_compiler::{closure#1}>::{closure#0}, core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>>::{closure#0}, core[1ba1e5b678f06b4b]::result::Result<(), rustc_errors[7aeb3e71f7c7c132]::ErrorGuaranteed>>::{closure#1} as core[1ba1e5b678f06b4b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  20:        0x10ab79247 - std::sys::unix::thread::Thread::new::thread_start::h43d8da863ccef6fd
  21:     0x7ff80859a4e1 - __pthread_start

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.62.0-nightly (4c60a0ea5 2022-05-04) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `helloworld`

Caused by:
  process didn't exit successfully: `rustc --crate-name helloworld --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C metadata=76ae0eeacf88be1b -C extra-filename=-76ae0eeacf88be1b --out-dir /Users/ashutoshsrivastava/workspace/coding/rustlearn/helloworld/target/debug/deps -C incremental=/Users/ashutoshsrivastava/workspace/coding/rustlearn/helloworld/target/debug/incremental -L dependency=/Users/ashutoshsrivastava/workspace/coding/rustlearn/helloworld/target/debug/deps` (signal: 6, SIGABRT: process abort signal)

@akrsri akrsri added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 19, 2022
@SNCPlay42
Copy link
Contributor

Duplicate of #96583, which is already fixed. Output on latest nightly:

error[E0599]: no method named `read_line` found for fn item `fn() -> Stdin {stdin}` in the current scope
  --> src/main.rs:5:24
   |
5  |         std::io::stdin.read_line(&mut inner).unwrap();
   |         -------------- ^^^^^^^^^ method not found in `fn() -> Stdin {stdin}`
   |         |
   |         this is a function, perhaps you wish to call it
...
15 |     read_vec!(v as u32);
   |     ------------------- in this macro invocation
   |
   = note: this error originates in the macro `read_vec` (in Nightly builds, run with -Z macro-backtrace for more info)

@matthiaskrgr
Copy link
Member

Can't reproduce with rustc 1.63.0-nightly (c06728704 2022-05-19), closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants