-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Open
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitC-bugCategory: This is a bug.Category: This is a bug.F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`F-pin_ergonomics`#![feature(pin_ergonomics)]``#![feature(pin_ergonomics)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
auto-reduced (treereduce-rust):
//@compile-flags: --edition=2024 --cap-lints=warn
#![feature(min_generic_const_args)]
#![feature(adt_const_params)]
#![feature(pin_ergonomics)]
async fn other() {}
pub async fn uhoh() {
other().await;
}
fn main() {}original:
//@ edition:2018
#![feature(must_not_suspend)]
#![deny(must_not_suspend)]
#[must_not_suspend]
trait Wow {}
impl Wow for i32 {}
fn r#impl() -> impl Wow {
1
}
fn r#dyn() -> Box<dyn Wow> {
Box::new(1)
}
async fn other() {}
pub async fn uhoh() {
let _guard1 = r#impl(); //~ ERROR implementer of `Wow` held across
let _guard2 = r#dyn(); // Trying to access the data in a vtable does not work, either.
other().await;
}
fn main() {
}Version information
rustc 1.96.0-nightly (d1c79458b 2026-03-11)
binary: rustc
commit-hash: d1c79458b5d13bd0179d7dbafd5ca4ea9ae3e6aa
commit-date: 2026-03-11
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.0
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --edition=2024 --cap-lints=warn -Zcrate-attr=feature(min_generic_const_args) -Zcrate-attr=feature(adt_const_params) -Zcrate-attr=feature(pin_ergonomics)
Program output
warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
--> <crate attribute>:1:12
|
1 | #![feature(min_generic_const_args)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: the feature `pin_ergonomics` is incomplete and may not be safe to use and/or cause compiler crashes
--> <crate attribute>:1:12
|
1 | #![feature(pin_ergonomics)]
| ^^^^^^^^^^^^^^
|
= note: see issue #130494 <https://github.com/rust-lang/rust/issues/130494> for more information
warning: 2 warnings emitted
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: explicit deref of non-derefable type
--> /tmp/icemaker_global_tempdir.zSJT70QNghmg/rustc_testrunner_tmpdir_reporting.nyD9Mf6Fn4JA/mvce.rs:4:13
|
4 | other().await;
| ^^^^^
|
note: delayed at /rustc-dev/d1c79458b5d13bd0179d7dbafd5ca4ea9ae3e6aa/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:200:20
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
3: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
4: <&rustc_hir_typeck::fn_ctxt::FnCtxt as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::report_bug::<&str>
5: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::cat_deref
6: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
7: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
8: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
9: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
10: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_block
11: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
12: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
13: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
14: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_block
15: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
16: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
17: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
18: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
19: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_block
20: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
21: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
22: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
23: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
24: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_block
25: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::walk_expr
26: <rustc_hir_typeck::expr_use_visitor::ExprUseVisitor<&rustc_hir_typeck::fn_ctxt::FnCtxt, &mut rustc_hir_typeck::upvar::InferBorrowKind>>::consume_expr
27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::analyze_closure
28: <rustc_hir_typeck::upvar::InferBorrowKindVisitor as rustc_hir::intravisit::Visitor>::visit_expr
29: rustc_hir_typeck::typeck_with_inspect::{closure#0}
30: rustc_query_impl::query_impl::typeck::invoke_provider_fn::__rust_begin_short_backtrace
31: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
32: rustc_query_impl::query_impl::typeck::execute_query_non_incr::__rust_end_short_backtrace
33: rustc_mir_build::thir::pattern::check_match::check_match
34: rustc_query_impl::query_impl::check_match::invoke_provider_fn::__rust_begin_short_backtrace
35: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 1]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
36: rustc_query_impl::query_impl::check_match::execute_query_non_incr::__rust_end_short_backtrace
37: rustc_mir_build::builder::build_mir_inner_impl
38: rustc_mir_transform::mir_built
39: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
40: rustc_query_impl::query_impl::mir_built::execute_query_non_incr::__rust_end_short_backtrace
41: rustc_mir_transform::ffi_unwind_calls::has_ffi_unwind_calls
42: rustc_query_impl::query_impl::has_ffi_unwind_calls::invoke_provider_fn::__rust_begin_short_backtrace
43: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 1]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
44: rustc_query_impl::query_impl::has_ffi_unwind_calls::execute_query_non_incr::__rust_end_short_backtrace
45: rustc_mir_transform::mir_promoted
46: rustc_query_impl::query_impl::mir_promoted::invoke_provider_fn::__rust_begin_short_backtrace
47: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 16]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
48: rustc_query_impl::query_impl::mir_promoted::execute_query_non_incr::__rust_end_short_backtrace
49: rustc_borrowck::mir_borrowck
50: rustc_query_impl::query_impl::mir_borrowck::invoke_provider_fn::__rust_begin_short_backtrace
51: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
52: rustc_query_impl::query_impl::mir_borrowck::execute_query_non_incr::__rust_end_short_backtrace
53: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
54: rustc_hir_analysis::collect::type_of::type_of_opaque
55: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefIdCache<rustc_middle::query::erase::ErasedData<[u8; 8]>>, false>
56: rustc_query_impl::query_impl::type_of_opaque::execute_query_non_incr::__rust_end_short_backtrace
57: rustc_hir_analysis::collect::type_of::type_of
58: rustc_query_impl::query_impl::type_of::invoke_provider_fn::__rust_begin_short_backtrace
59: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefIdCache<rustc_middle::query::erase::ErasedData<[u8; 8]>>, false>
60: rustc_query_impl::query_impl::type_of::execute_query_non_incr::__rust_end_short_backtrace
61: rustc_hir_analysis::check::check::check_opaque
62: rustc_hir_analysis::check::check::check_item_type
63: rustc_hir_analysis::check::wfcheck::check_well_formed
64: rustc_query_impl::query_impl::check_well_formed::invoke_provider_fn::__rust_begin_short_backtrace
65: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 1]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
66: rustc_query_impl::query_impl::check_well_formed::execute_query_non_incr::__rust_end_short_backtrace
67: rustc_hir_analysis::check::wfcheck::check_type_wf
68: rustc_query_impl::query_impl::check_type_wf::invoke_provider_fn::__rust_begin_short_backtrace
69: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 1]>>, false>
70: rustc_query_impl::query_impl::check_type_wf::execute_query_non_incr::__rust_end_short_backtrace
71: rustc_hir_analysis::check_crate
72: rustc_interface::passes::analysis
73: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
74: rustc_query_impl::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
75: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
76: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
77: <std::thread::lifecycle::spawn_unchecked<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
78: <std::sys::thread::unix::Thread>::new::thread_start
79: <unknown>
80: <unknown>
--> /tmp/icemaker_global_tempdir.zSJT70QNghmg/rustc_testrunner_tmpdir_reporting.nyD9Mf6Fn4JA/mvce.rs:4:13
|
4 | other().await;
| ^^^^^
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 make sure that you have updated to the latest nightly
note: rustc 1.96.0-nightly (d1c79458b 2026-03-11) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z crate-attr=feature(min_generic_const_args) -Z crate-attr=feature(adt_const_params) -Z crate-attr=feature(pin_ergonomics) -Z dump-mir-dir=dir
query stack during panic:
end of query stack
@rustbot label +F-min_generic_const_args +F-adt_const_params +F-pin_ergonomics
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitC-bugCategory: This is a bug.Category: This is a bug.F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`F-pin_ergonomics`#![feature(pin_ergonomics)]``#![feature(pin_ergonomics)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Type
Fields
Give feedbackNo fields configured for issues without a type.