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

ice: effects: parent also has host effect param? #113378

Closed
matthiaskrgr opened this issue Jul 5, 2023 · 1 comment · Fixed by #119505
Closed

ice: effects: parent also has host effect param? #113378

matthiaskrgr opened this issue Jul 5, 2023 · 1 comment · Fixed by #119505
Assignees
Labels
C-bug Category: This is a bug. F-effects `#![feature(effects)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

#![feature(const_trait_impl)]
#![feature(effects)]

trait Value {}

impl<T> const Value for T {
    const fn value() -> u32 {
        0
    }
}

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (e4cd16100 2023-07-05)
binary: rustc
commit-hash: e4cd1610067501fa4d347eba7b18f77137dbbf48
commit-date: 2023-07-05
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error[E0379]: functions in traits cannot be declared const
 --> treereduce.out:7:5
  |
7 |     const  fn value() -> u32 {
  |     ^^^^^ functions in traits cannot be const

error[E0407]: method `value` is not a member of trait `Value`
 --> treereduce.out:7:5
  |
7 | /     const  fn value() -> u32 {
8 | |         0
9 | |     }
  | |_____^ not a member of trait `Value`

error[E0601]: `main` function not found in crate `treereduce`
  --> treereduce.out:10:2
   |
10 | }
   |  ^ consider adding a `main` function to `treereduce.out`

error: const `impl` for trait `Value` which is not marked with `#[const_trait]`
 --> treereduce.out:6:15
  |
4 | trait Value {}
  | - help: mark `Value` as const: `#[const_trait]`
5 |
6 | impl<T> const Value for T {
  |               ^^^^^
  |
  = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
  = note: adding a non-const method body in the future would be a breaking change
Backtrace

error: internal compiler error: compiler/rustc_hir_analysis/src/collect/generics_of.rs:319:21: parent also has host effect param? index: 1, def: DefId(0:6 ~ treereduce[e3bb]::{impl#0}::value)

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/compiler/rustc_errors/src/lib.rs:1651:9
stack backtrace:
   0:     0x7f3658763a81 - std::backtrace_rs::backtrace::libunwind::trace::hd0180fafc3f67189
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f3658763a81 - std::backtrace_rs::backtrace::trace_unsynchronized::h5f5f542cfcd3ea93
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3658763a81 - std::sys_common::backtrace::_print_fmt::h58fe9485d729332b
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f3658763a81 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h892fa574703406ce
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f36587c9d8f - core::fmt::rt::Argument::fmt::h9323d9ac1296ca86
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/core/src/fmt/rt.rs:138:9
   5:     0x7f36587c9d8f - core::fmt::write::h7b3311fc7bec7011
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f36587564c7 - std::io::Write::write_fmt::hf0bd33b3cf0f8fc8
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/io/mod.rs:1714:15
   7:     0x7f3658763895 - std::sys_common::backtrace::_print::h05e7ce29169ad453
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f3658763895 - std::sys_common::backtrace::print::h259bd490e3a5f495
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f3658766673 - std::panicking::default_hook::{{closure}}::h60419100c25d1f9e
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:269:22
  10:     0x7f3658766404 - std::panicking::default_hook::h5458ac0b23f9b258
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:288:9
  11:     0x7f365ba3634b - rustc_driver_impl[e2bfb106dcd1f64f]::install_ice_hook::{closure#0}
  12:     0x7f3658766e9e - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h4fc06bcacf328e1a
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/alloc/src/boxed.rs:2024:9
  13:     0x7f3658766e9e - std::panicking::rust_panic_with_hook::hc4b8011c5070ed88
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:709:13
  14:     0x7f365bff5291 - std[c4949d010b2b12f5]::panicking::begin_panic::<rustc_errors[6daf178d4ec2233]::ExplicitBug>::{closure#0}
  15:     0x7f365bff36e6 - std[c4949d010b2b12f5]::sys_common::backtrace::__rust_end_short_backtrace::<std[c4949d010b2b12f5]::panicking::begin_panic<rustc_errors[6daf178d4ec2233]::ExplicitBug>::{closure#0}, !>
  16:     0x7f365bff35a6 - std[c4949d010b2b12f5]::panicking::begin_panic::<rustc_errors[6daf178d4ec2233]::ExplicitBug>
  17:     0x7f365bf558b4 - <rustc_errors[6daf178d4ec2233]::HandlerInner>::bug::<alloc[ff37fbd0c789fff0]::string::String>
  18:     0x7f365bf55736 - <rustc_errors[6daf178d4ec2233]::Handler>::bug::<alloc[ff37fbd0c789fff0]::string::String>
  19:     0x7f365bf652fc - rustc_middle[36f410a133de2eee]::util::bug::opt_span_bug_fmt::<rustc_span[ffa356b4eef30eb1]::span_encoding::Span>::{closure#0}
  20:     0x7f365bf64a0a - rustc_middle[36f410a133de2eee]::ty::context::tls::with_opt::<rustc_middle[36f410a133de2eee]::util::bug::opt_span_bug_fmt<rustc_span[ffa356b4eef30eb1]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f365bf649da - rustc_middle[36f410a133de2eee]::ty::context::tls::with_context_opt::<rustc_middle[36f410a133de2eee]::ty::context::tls::with_opt<rustc_middle[36f410a133de2eee]::util::bug::opt_span_bug_fmt<rustc_span[ffa356b4eef30eb1]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f365a16610d - rustc_middle[36f410a133de2eee]::util::bug::bug_fmt
  23:     0x7f365a3742a6 - rustc_hir_analysis[efec7ea34622ed25]::collect::generics_of::generics_of
  24:     0x7f365a370c58 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b274d6131f7b1f90]::query_impl::generics_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 8usize]>>
  25:     0x7f365a370bf0 - <rustc_query_impl[b274d6131f7b1f90]::query_impl::generics_of::dynamic_query::{closure#2} as core[1877eeee917502d9]::ops::function::FnOnce<(rustc_middle[36f410a133de2eee]::ty::context::TyCtxt, rustc_span[ffa356b4eef30eb1]::def_id::DefId)>>::call_once
  26:     0x7f3659a6ad65 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::<rustc_query_impl[b274d6131f7b1f90]::DynamicConfig<rustc_query_system[d3399df1ed0f61e2]::query::caches::DefaultCache<rustc_span[ffa356b4eef30eb1]::def_id::DefId, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
  27:     0x7f365b3b6ed3 - rustc_query_impl[b274d6131f7b1f90]::query_impl::generics_of::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7f365a0d5e5b - <rustc_hir_analysis[efec7ea34622ed25]::collect::CollectItemTypesVisitor as rustc_hir[7d2fcfc22a87f39c]::intravisit::Visitor>::visit_impl_item
  29:     0x7f365a0d4e0e - <rustc_middle[36f410a133de2eee]::hir::map::Map>::visit_item_likes_in_module::<rustc_hir_analysis[efec7ea34622ed25]::collect::CollectItemTypesVisitor>
  30:     0x7f365a0d4c8c - rustc_hir_analysis[efec7ea34622ed25]::collect::collect_mod_item_types
  31:     0x7f365a69fb4c - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b274d6131f7b1f90]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 0usize]>>
  32:     0x7f365a69fb2e - <rustc_query_impl[b274d6131f7b1f90]::query_impl::collect_mod_item_types::dynamic_query::{closure#2} as core[1877eeee917502d9]::ops::function::FnOnce<(rustc_middle[36f410a133de2eee]::ty::context::TyCtxt, rustc_span[ffa356b4eef30eb1]::def_id::LocalDefId)>>::call_once
  33:     0x7f365a18a7df - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::<rustc_query_impl[b274d6131f7b1f90]::DynamicConfig<rustc_query_system[d3399df1ed0f61e2]::query::caches::VecCache<rustc_span[ffa356b4eef30eb1]::def_id::LocalDefId, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
  34:     0x7f365b37f974 - rustc_query_impl[b274d6131f7b1f90]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7f365ae79147 - <rustc_middle[36f410a133de2eee]::hir::map::Map>::for_each_module::<rustc_hir_analysis[efec7ea34622ed25]::check_crate::{closure#0}::{closure#0}::{closure#0}>
  36:     0x7f365ae78d82 - <rustc_session[9ee8792a77577862]::session::Session>::track_errors::<rustc_hir_analysis[efec7ea34622ed25]::check_crate::{closure#0}, ()>
  37:     0x7f365ae77561 - rustc_hir_analysis[efec7ea34622ed25]::check_crate
  38:     0x7f365ae6e64a - rustc_interface[b03e5b36acd0a493]::passes::analysis
  39:     0x7f365aef958a - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b274d6131f7b1f90]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 1usize]>>
  40:     0x7f365aef9579 - <rustc_query_impl[b274d6131f7b1f90]::query_impl::analysis::dynamic_query::{closure#2} as core[1877eeee917502d9]::ops::function::FnOnce<(rustc_middle[36f410a133de2eee]::ty::context::TyCtxt, ())>>::call_once
  41:     0x7f365b092e88 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::<rustc_query_impl[b274d6131f7b1f90]::DynamicConfig<rustc_query_system[d3399df1ed0f61e2]::query::caches::SingleCache<rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
  42:     0x7f365b092c59 - rustc_query_impl[b274d6131f7b1f90]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  43:     0x7f365ac62545 - <rustc_middle[36f410a133de2eee]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
  44:     0x7f365ac61b72 - <rustc_interface[b03e5b36acd0a493]::interface::Compiler>::enter::<rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}::{closure#2}, core[1877eeee917502d9]::result::Result<core[1877eeee917502d9]::option::Option<rustc_interface[b03e5b36acd0a493]::queries::Linker>, rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
  45:     0x7f365ac58885 - rustc_span[ffa356b4eef30eb1]::set_source_map::<core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>, rustc_interface[b03e5b36acd0a493]::interface::run_compiler<core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  46:     0x7f365ac582f6 - <scoped_tls[d5e856d8f723ce14]::ScopedKey<rustc_span[ffa356b4eef30eb1]::SessionGlobals>>::set::<rustc_interface[b03e5b36acd0a493]::interface::run_compiler<core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
  47:     0x7f365ac578bc - std[c4949d010b2b12f5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b03e5b36acd0a493]::util::run_in_thread_pool_with_globals<rustc_interface[b03e5b36acd0a493]::interface::run_compiler<core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
  48:     0x7f365ac57685 - <<std[c4949d010b2b12f5]::thread::Builder>::spawn_unchecked_<rustc_interface[b03e5b36acd0a493]::util::run_in_thread_pool_with_globals<rustc_interface[b03e5b36acd0a493]::interface::run_compiler<core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>::{closure#1} as core[1877eeee917502d9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:     0x7f3658771315 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha34cb32f4acd27b7
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/alloc/src/boxed.rs:2010:9
  50:     0x7f3658771315 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h309fb4796a356ecf
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/alloc/src/boxed.rs:2010:9
  51:     0x7f3658771315 - std::sys::unix::thread::Thread::new::thread_start::h947cced02a86e329
                               at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys/unix/thread.rs:108:17
  52:     0x7f365850444b - <unknown>
  53:     0x7f3658587e40 - <unknown>
  54:                0x0 - <unknown>

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.72.0-nightly (e4cd16100 2023-07-05) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [generics_of] computing generics of `<impl at treereduce.out:6:1: 6:26>::value`
#1 [collect_mod_item_types] collecting item types in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 5 previous errors

Some errors have detailed explanations: E0379, E0407, E0601.
For more information about an error, try `rustc --explain E0379`.

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way. F-effects `#![feature(effects)]` labels Jul 5, 2023
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Jul 11, 2023
@YakoYakoYokuYoku
Copy link

Also hit this with...

#![feature(const_trait_impl, effects, rustc_attrs)]

#[const_trait]
pub trait Stone {
    type Recorded: Copy;

    fn get_record<#[rustc_host] const host: bool = true>(&self) -> Self::Recorded;
}

pub struct Wall<T: Stone>(T::Recorded);

pub struct Brick;

impl const Stone for Brick {
    type Recorded = i32;
    
    fn get_record(&self) -> i32 {
        0
    }
}

impl<T: ~const Stone> Wall<T> {
    const fn new(value: T) -> Self {
        Self(value.get_record())
    }
}

fn main() {
    let _ = Wall::new(Brick);
}

Error output...

   Compiling playground v0.0.1 (/playground)
warning: the feature `rustc_attrs` is internal to the compiler or standard library
 --> src/main.rs:1:39
  |
1 | #![feature(const_trait_impl, effects, rustc_attrs)]
  |                                       ^^^^^^^^^^^
  |
  = note: using it is strongly discouraged
  = note: `#[warn(internal_features)]` on by default

error: internal compiler error: compiler/rustc_hir_analysis/src/collect/generics_of.rs:320:21: parent also has host effect param? index: 1, def: DefId(0:5 ~ playground[bb69]::Stone::get_record)

thread 'rustc' panicked at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/compiler/rustc_errors/src/lib.rs:1659:9:
Box<dyn Any>
stack backtrace:
   ... see backtrace ...

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: please attach the file at `/playground/rustc-ice-2023-10-21T16_54_00-17.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2

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

query stack during panic:
#0 [generics_of] computing generics of `Stone::get_record`
#1 [collect_mod_item_types] collecting item types in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
warning: `playground` (bin "playground") generated 1 warning
error: could not compile `playground` (bin "playground"); 1 warning emitted
Backtrace

   0:     0x7f1ea4a3b17c - std::backtrace_rs::backtrace::libunwind::trace::he8dc9e634c3d5b69
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f1ea4a3b17c - std::backtrace_rs::backtrace::trace_unsynchronized::hcc1fc094cc2c1843
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1ea4a3b17c - std::sys_common::backtrace::_print_fmt::he6c8e9059e21630d
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f1ea4a3b17c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h145361bce15f4a6a
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f1ea4a9d400 - core::fmt::rt::Argument::fmt::hb890552c7d6e8c2b
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/core/src/fmt/rt.rs:142:9
   5:     0x7f1ea4a9d400 - core::fmt::write::h97d71643815ece8a
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/core/src/fmt/mod.rs:1117:17
   6:     0x7f1ea4a2f09f - std::io::Write::write_fmt::h9145d12d2fb312aa
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/io/mod.rs:1762:15
   7:     0x7f1ea4a3af64 - std::sys_common::backtrace::_print::h34d8c7ca46068513
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f1ea4a3af64 - std::sys_common::backtrace::print::h69de4357a88b4f9d
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f1ea4a3dbf7 - std::panicking::default_hook::{{closure}}::hbf7d8b588847f0d6
  10:     0x7f1ea4a3d95f - std::panicking::default_hook::h797e21049b5f2e1d
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/panicking.rs:292:9
  11:     0x7f1ea75777a0 - std[df43e54be7296dae]::panicking::update_hook::<alloc[a0c5d851eb3ca09f]::boxed::Box<rustc_driver_impl[2bf85641168174bb]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f1ea4a3e338 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h49df07f7cb25728d
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/alloc/src/boxed.rs:2021:9
  13:     0x7f1ea4a3e338 - std::panicking::rust_panic_with_hook::h4b1939882c095f9c
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/panicking.rs:735:13
  14:     0x7f1ea7933c54 - std[df43e54be7296dae]::panicking::begin_panic::<rustc_errors[70da22a231bf69a3]::ExplicitBug>::{closure#0}
  15:     0x7f1ea792b676 - std[df43e54be7296dae]::sys_common::backtrace::__rust_end_short_backtrace::<std[df43e54be7296dae]::panicking::begin_panic<rustc_errors[70da22a231bf69a3]::ExplicitBug>::{closure#0}, !>
  16:     0x7f1ea7926236 - std[df43e54be7296dae]::panicking::begin_panic::<rustc_errors[70da22a231bf69a3]::ExplicitBug>
  17:     0x7f1ea790ec34 - <rustc_errors[70da22a231bf69a3]::HandlerInner>::bug::<alloc[a0c5d851eb3ca09f]::string::String>
  18:     0x7f1ea790e9f4 - <rustc_errors[70da22a231bf69a3]::Handler>::bug::<alloc[a0c5d851eb3ca09f]::string::String>
  19:     0x7f1ea79ad2dd - rustc_middle[f16a63e6dbe53fea]::util::bug::opt_span_bug_fmt::<rustc_span[bab404b0fd46984d]::span_encoding::Span>::{closure#0}
  20:     0x7f1ea79941ea - rustc_middle[f16a63e6dbe53fea]::ty::context::tls::with_opt::<rustc_middle[f16a63e6dbe53fea]::util::bug::opt_span_bug_fmt<rustc_span[bab404b0fd46984d]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f1ea79940a8 - rustc_middle[f16a63e6dbe53fea]::ty::context::tls::with_context_opt::<rustc_middle[f16a63e6dbe53fea]::ty::context::tls::with_opt<rustc_middle[f16a63e6dbe53fea]::util::bug::opt_span_bug_fmt<rustc_span[bab404b0fd46984d]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f1ea5aaf410 - rustc_middle[f16a63e6dbe53fea]::util::bug::bug_fmt
  23:     0x7f1ea6bda0a2 - rustc_hir_analysis[8c6a7b4af31adcee]::collect::generics_of::generics_of
  24:     0x7f1ea89209ec - rustc_query_impl[ad97e9652dfc28d8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad97e9652dfc28d8]::query_impl::generics_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f16a63e6dbe53fea]::query::erase::Erased<[u8; 8usize]>>
  25:     0x7f1ea8736685 - rustc_query_system[74c97372728b1147]::query::plumbing::try_execute_query::<rustc_query_impl[ad97e9652dfc28d8]::DynamicConfig<rustc_query_system[74c97372728b1147]::query::caches::DefaultCache<rustc_span[bab404b0fd46984d]::def_id::DefId, rustc_middle[f16a63e6dbe53fea]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ad97e9652dfc28d8]::plumbing::QueryCtxt, false>
  26:     0x7f1ea86d241b - rustc_query_impl[ad97e9652dfc28d8]::query_impl::generics_of::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7f1ea89d8686 - <rustc_hir_analysis[8c6a7b4af31adcee]::collect::CollectItemTypesVisitor as rustc_hir[8b8e894857302677]::intravisit::Visitor>::visit_trait_item
  28:     0x7f1ea8b16cad - rustc_hir_analysis[8c6a7b4af31adcee]::collect::collect_mod_item_types
  29:     0x7f1ea8b16b7d - rustc_query_impl[ad97e9652dfc28d8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad97e9652dfc28d8]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f16a63e6dbe53fea]::query::erase::Erased<[u8; 0usize]>>
  30:     0x7f1ea8c209b4 - rustc_query_system[74c97372728b1147]::query::plumbing::try_execute_query::<rustc_query_impl[ad97e9652dfc28d8]::DynamicConfig<rustc_query_system[74c97372728b1147]::query::caches::DefaultCache<rustc_span[bab404b0fd46984d]::def_id::LocalModDefId, rustc_middle[f16a63e6dbe53fea]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad97e9652dfc28d8]::plumbing::QueryCtxt, false>
  31:     0x7f1ea8c20483 - rustc_query_impl[ad97e9652dfc28d8]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  32:     0x7f1ea89ac3eb - rustc_hir_analysis[8c6a7b4af31adcee]::check_crate
  33:     0x7f1ea8cf8c5f - rustc_interface[af334b81148fb8cb]::passes::analysis
  34:     0x7f1ea8cf8661 - rustc_query_impl[ad97e9652dfc28d8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad97e9652dfc28d8]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f16a63e6dbe53fea]::query::erase::Erased<[u8; 1usize]>>
  35:     0x7f1ea91dade6 - rustc_query_system[74c97372728b1147]::query::plumbing::try_execute_query::<rustc_query_impl[ad97e9652dfc28d8]::DynamicConfig<rustc_query_system[74c97372728b1147]::query::caches::SingleCache<rustc_middle[f16a63e6dbe53fea]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ad97e9652dfc28d8]::plumbing::QueryCtxt, false>
  36:     0x7f1ea91dac15 - rustc_query_impl[ad97e9652dfc28d8]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7f1ea93f9caa - std[df43e54be7296dae]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[af334b81148fb8cb]::util::run_in_thread_with_globals<rustc_interface[af334b81148fb8cb]::interface::run_compiler<core[af478687de187ad3]::result::Result<(), rustc_span[bab404b0fd46984d]::ErrorGuaranteed>, rustc_driver_impl[2bf85641168174bb]::run_compiler::{closure#1}>::{closure#0}, core[af478687de187ad3]::result::Result<(), rustc_span[bab404b0fd46984d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[af478687de187ad3]::result::Result<(), rustc_span[bab404b0fd46984d]::ErrorGuaranteed>>
  38:     0x7f1ea93f8fb3 - <<std[df43e54be7296dae]::thread::Builder>::spawn_unchecked_<rustc_interface[af334b81148fb8cb]::util::run_in_thread_with_globals<rustc_interface[af334b81148fb8cb]::interface::run_compiler<core[af478687de187ad3]::result::Result<(), rustc_span[bab404b0fd46984d]::ErrorGuaranteed>, rustc_driver_impl[2bf85641168174bb]::run_compiler::{closure#1}>::{closure#0}, core[af478687de187ad3]::result::Result<(), rustc_span[bab404b0fd46984d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[af478687de187ad3]::result::Result<(), rustc_span[bab404b0fd46984d]::ErrorGuaranteed>>::{closure#1} as core[af478687de187ad3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7f1ea4a49105 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hac2e24a72c9237b1
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/alloc/src/boxed.rs:2007:9
  40:     0x7f1ea4a49105 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0a4ea247e7a2feab
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/alloc/src/boxed.rs:2007:9
  41:     0x7f1ea4a49105 - std::sys::unix::thread::Thread::new::thread_start::ha157bf15852ae2a4
                               at /rustc/249624b5043013d18c00f0401ca431c1a6baa8cd/library/std/src/sys/unix/thread.rs:108:17
  42:     0x7f1ea4939609 - start_thread
  43:     0x7f1ea485c133 - clone
  44:                0x0 - <unknown>

@fmease fmease self-assigned this Jan 1, 2024
fmease added a commit to fmease/rust that referenced this issue Jan 2, 2024
…, r=fee1-dead

Don't synthesize host effect params for trait associated functions marked const

Fixes rust-lang#113378.

r? fee1-dead or compiler
fmease added a commit to fmease/rust that referenced this issue Jan 3, 2024
…, r=fee1-dead

Don't synthesize host effect params for trait associated functions marked const

Fixes rust-lang#113378.

r? fee1-dead or compiler
fmease added a commit to fmease/rust that referenced this issue Jan 3, 2024
…, r=fee1-dead

Don't synthesize host effect params for trait associated functions marked const

Fixes rust-lang#113378.

r? fee1-dead or compiler
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 3, 2024
Rollup merge of rust-lang#119505 - fmease:no-host-param-for-trait-fns, r=fee1-dead

Don't synthesize host effect params for trait associated functions marked const

Fixes rust-lang#113378.

r? fee1-dead or compiler
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. F-effects `#![feature(effects)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants