Don't inline drop shims with unsubstituted generic consts in MIR inliner
This commit is contained in:
parent
90c2b238e6
commit
f17b27b301
@ -11,7 +11,7 @@
|
||||
use rustc_middle::mir::visit::*;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TypeVisitableExt;
|
||||
use rustc_middle::ty::{self, Instance, InstanceKind, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{self, Instance, InstanceKind, ParamEnv, Ty, TyCtxt, TypeFlags};
|
||||
use rustc_session::config::{DebugInfo, OptLevel};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::sym;
|
||||
@ -306,6 +306,16 @@ fn check_mir_is_available(
|
||||
InstanceKind::Intrinsic(_) | InstanceKind::Virtual(..) => {
|
||||
return Err("instance without MIR (intrinsic / virtual)");
|
||||
}
|
||||
|
||||
// FIXME(#127030): `ConstParamHasTy` has bad interactions with
|
||||
// the drop shim builder, which does not evaluate predicates in
|
||||
// the correct param-env for types being dropped. Stall resolving
|
||||
// the MIR for this instance until all of its const params are
|
||||
// substituted.
|
||||
InstanceKind::DropGlue(_, Some(ty)) if ty.has_type_flags(TypeFlags::HAS_CT_PARAM) => {
|
||||
return Err("still needs substitution");
|
||||
}
|
||||
|
||||
// This cannot result in an immediate cycle since the callee MIR is a shim, which does
|
||||
// not get any optimizations run on it. Any subsequent inlining may cause cycles, but we
|
||||
// do not need to catch this here, we can wait until the inliner decides to continue
|
||||
|
@ -1,8 +1,5 @@
|
||||
//@ compile-flags: -Zinline-mir=yes --crate-type=lib
|
||||
|
||||
//@ known-bug: unknown
|
||||
//@ build-fail
|
||||
//@ failure-status: 101
|
||||
//@ build-pass
|
||||
|
||||
use std::mem::ManuallyDrop;
|
||||
|
||||
|
@ -1,257 +0,0 @@
|
||||
thread 'rustc' panicked at compiler/rustc_middle/src/ty/sty.rs:360:36:
|
||||
called `Option::unwrap()` on a `None` value
|
||||
stack backtrace:
|
||||
0: begin_panic_handler
|
||||
at ./library/std/src/panicking.rs:661:5
|
||||
1: panic_fmt
|
||||
at ./library/core/src/panicking.rs:74:14
|
||||
2: panic
|
||||
at ./library/core/src/panicking.rs:148:5
|
||||
3: core::option::unwrap_failed
|
||||
at ./library/core/src/option.rs:2013:5
|
||||
4: unwrap<rustc_middle::ty::Ty>
|
||||
at ./library/core/src/option.rs:963:21
|
||||
5: find_ty_from_env
|
||||
at ./compiler/rustc_middle/src/ty/sty.rs:360:18
|
||||
6: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1016:29
|
||||
7: maybe_grow<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, rustc_trait_selection::traits::select::{impl#1}::evaluate_predicate_recursively::{closure#0}::{closure_env#0}>
|
||||
at /home/michael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
|
||||
8: ensure_sufficient_stack<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, rustc_trait_selection::traits::select::{impl#1}::evaluate_predicate_recursively::{closure#0}::{closure_env#0}>
|
||||
at ./compiler/rustc_data_structures/src/stack.rs:17:5
|
||||
9: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:664:9
|
||||
10: evaluate_predicate_recursively
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:643:5
|
||||
11: evaluate_predicates_recursively<alloc::vec::into_iter::IntoIter<rustc_infer::traits::Obligation<rustc_middle::ty::predicate::Predicate>, alloc::alloc::Global>>
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:631:24
|
||||
12: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1317:21
|
||||
13: {closure#0}<rustc_trait_selection::traits::select::{impl#1}::evaluate_candidate::{closure#0}::{closure_env#0}>
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:596:26
|
||||
14: probe<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, rustc_trait_selection::traits::select::{impl#1}::evaluation_probe::{closure_env#0}<rustc_trait_selection::traits::select::{impl#1}::evaluate_candidate::{closure#0}::{closure_env#0}>>
|
||||
at ./compiler/rustc_infer/src/infer/snapshot/mod.rs:85:17
|
||||
15: <rustc_trait_selection::traits::select::SelectionContext>::evaluation_probe::<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}>
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:594:9
|
||||
16: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1298:26
|
||||
17: evaluate_candidate
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1286:5
|
||||
18: evaluate_stack
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1257:28
|
||||
19: {closure#1}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1083:30
|
||||
20: {closure#0}<rustc_trait_selection::traits::select::{impl#1}::evaluate_trait_predicate_recursively::{closure#0}::{closure_env#1}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1445:88
|
||||
21: with_anon_task<rustc_middle::dep_graph::DepsType, rustc_middle::ty::context::TyCtxt, rustc_trait_selection::traits::select::{impl#1}::in_task::{closure_env#0}<rustc_trait_selection::traits::select::{impl#1}::evaluate_trait_predicate_recursively::{closure#0}::{closure_env#1}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
|
||||
at ./compiler/rustc_query_system/src/dep_graph/graph.rs:306:22
|
||||
22: in_task<rustc_trait_selection::traits::select::{impl#1}::evaluate_trait_predicate_recursively::{closure#0}::{closure_env#1}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1445:13
|
||||
23: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1082:34
|
||||
24: evaluate_trait_predicate_recursively
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:1037:5
|
||||
25: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:671:21
|
||||
26: maybe_grow<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, rustc_trait_selection::traits::select::{impl#1}::evaluate_predicate_recursively::{closure#0}::{closure_env#0}>
|
||||
at /home/michael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
|
||||
27: ensure_sufficient_stack<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, rustc_trait_selection::traits::select::{impl#1}::evaluate_predicate_recursively::{closure#0}::{closure_env#0}>
|
||||
at ./compiler/rustc_data_structures/src/stack.rs:17:5
|
||||
28: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:664:9
|
||||
29: evaluate_predicate_recursively
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:643:5
|
||||
30: {closure#0}
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:572:30
|
||||
31: {closure#0}<rustc_trait_selection::traits::select::{impl#1}::evaluate_root_obligation::{closure_env#0}>
|
||||
at ./compiler/rustc_trait_selection/src/traits/select/mod.rs:596:26
|
||||
32: probe<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, rustc_trait_selection::traits::select::{impl#1}::evaluation_probe::{closure_env#0}<rustc_trait_selection::traits::select::{impl#1}::evaluate_root_obligation::{closure_env#0}>>
|
||||
at ./compiler/rustc_infer/src/infer/snapshot/mod.rs:85:17
|
||||
33: evaluate_obligation
|
||||
at ./compiler/rustc_traits/src/evaluate_obligation.rs:29:5
|
||||
34: {closure#0}
|
||||
at ./compiler/rustc_query_impl/src/plumbing.rs:281:9
|
||||
[... omitted 22 frames ...]
|
||||
35: query_get_at<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::predicate::Predicate>>, rustc_middle::query::erase::Erased<[u8; 2]>>>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:145:17
|
||||
36: evaluate_obligation
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:423:31
|
||||
37: evaluate_obligation
|
||||
at ./compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs:93:13
|
||||
38: evaluate_obligation_no_overflow
|
||||
at ./compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs:107:15
|
||||
39: {closure#0}<rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>>
|
||||
at ./compiler/rustc_trait_selection/src/traits/mod.rs:221:18
|
||||
40: pred_known_to_hold_modulo_regions<rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>>
|
||||
at ./compiler/rustc_trait_selection/src/traits/mod.rs:213:1
|
||||
41: rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions
|
||||
at ./compiler/rustc_trait_selection/src/traits/mod.rs:206:5
|
||||
42: rustc_ty_utils::common_traits::is_item_raw
|
||||
at ./compiler/rustc_ty_utils/src/common_traits.rs:33:5
|
||||
43: {closure#0}
|
||||
at ./compiler/rustc_query_impl/src/plumbing.rs:281:9
|
||||
[... omitted 22 frames ...]
|
||||
44: query_get_at<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Ty>, rustc_middle::query::erase::Erased<[u8; 1]>>>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:145:17
|
||||
45: is_copy_raw
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:423:31
|
||||
46: is_copy_raw
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:414:17
|
||||
47: is_copy_modulo_regions
|
||||
at ./compiler/rustc_middle/src/ty/util.rs:1243:48
|
||||
48: next<rustc_ty_utils::needs_drop::drop_tys_helper::{closure_env#0}<rustc_ty_utils::needs_drop::needs_drop_raw::{closure_env#0}>, alloc::vec::into_iter::IntoIter<rustc_middle::ty::Ty, alloc::alloc::Global>>
|
||||
at ./compiler/rustc_ty_utils/src/needs_drop.rs:184:26
|
||||
49: try_fold<rustc_ty_utils::needs_drop::NeedsDropTypes<rustc_ty_utils::needs_drop::drop_tys_helper::{closure_env#0}<rustc_ty_utils::needs_drop::needs_drop_raw::{closure_env#0}>>, (), core::iter::traits::iterator::Iterator::find::check::{closure_env#0}<core::result::Result<rustc_middle::ty::Ty, rustc_middle::ty::util::AlwaysRequiresDrop>, &mut rustc_ty_utils::needs_drop::filter_array_elements::{closure_env#0}>, core::ops::control_flow::ControlFlow<core::result::Result<rustc_middle::ty::Ty, rustc_middle::ty::util::AlwaysRequiresDrop>, ()>>
|
||||
at ./library/core/src/iter/traits/iterator.rs:2409:29
|
||||
50: find<rustc_ty_utils::needs_drop::NeedsDropTypes<rustc_ty_utils::needs_drop::drop_tys_helper::{closure_env#0}<rustc_ty_utils::needs_drop::needs_drop_raw::{closure_env#0}>>, &mut rustc_ty_utils::needs_drop::filter_array_elements::{closure_env#0}>
|
||||
at ./library/core/src/iter/traits/iterator.rs:2880:9
|
||||
51: next<rustc_ty_utils::needs_drop::NeedsDropTypes<rustc_ty_utils::needs_drop::drop_tys_helper::{closure_env#0}<rustc_ty_utils::needs_drop::needs_drop_raw::{closure_env#0}>>, rustc_ty_utils::needs_drop::filter_array_elements::{closure_env#0}>
|
||||
at ./library/core/src/iter/adapters/filter.rs:96:9
|
||||
52: needs_drop_raw
|
||||
at ./compiler/rustc_ty_utils/src/needs_drop.rs:24:15
|
||||
53: {closure#0}
|
||||
at ./compiler/rustc_query_impl/src/plumbing.rs:281:9
|
||||
[... omitted 22 frames ...]
|
||||
54: query_get_at<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Ty>, rustc_middle::query::erase::Erased<[u8; 1]>>>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:145:17
|
||||
55: needs_drop_raw
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:423:31
|
||||
56: needs_drop_raw
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:414:17
|
||||
57: needs_drop
|
||||
at ./compiler/rustc_middle/src/ty/util.rs:1433:17
|
||||
58: {closure#0}<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:378:13
|
||||
59: {closure#0}<(rustc_middle::mir::syntax::Place, core::option::Option<()>), alloc::alloc::Global, rustc_mir_dataflow::elaborate_drops::{impl#2}::drop_ladder::{closure_env#0}<rustc_mir_transform::shim::DropShimElaborator>>
|
||||
at ./library/alloc/src/vec/mod.rs:1683:32
|
||||
60: process_loop<alloc::vec::{impl#1}::retain::{closure_env#0}<(rustc_middle::mir::syntax::Place, core::option::Option<()>), alloc::alloc::Global, rustc_mir_dataflow::elaborate_drops::{impl#2}::drop_ladder::{closure_env#0}<rustc_mir_transform::shim::DropShimElaborator>>, (rustc_middle::mir::syntax::Place, core::option::Option<()>), alloc::alloc::Global, false>
|
||||
at ./library/alloc/src/vec/mod.rs:1763:21
|
||||
61: retain_mut<(rustc_middle::mir::syntax::Place, core::option::Option<()>), alloc::alloc::Global, alloc::vec::{impl#1}::retain::{closure_env#0}<(rustc_middle::mir::syntax::Place, core::option::Option<()>), alloc::alloc::Global, rustc_mir_dataflow::elaborate_drops::{impl#2}::drop_ladder::{closure_env#0}<rustc_mir_transform::shim::DropShimElaborator>>>
|
||||
at ./library/alloc/src/vec/mod.rs:1789:9
|
||||
62: retain<(rustc_middle::mir::syntax::Place, core::option::Option<()>), alloc::alloc::Global, rustc_mir_dataflow::elaborate_drops::{impl#2}::drop_ladder::{closure_env#0}<rustc_mir_transform::shim::DropShimElaborator>>
|
||||
at ./library/alloc/src/vec/mod.rs:1683:9
|
||||
63: drop_ladder<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:377:9
|
||||
64: open_drop_for_adt_contents<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:488:13
|
||||
65: {closure#0}<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:461:13
|
||||
66: open_drop_for_adt<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:440:5
|
||||
67: open_drop<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:869:35
|
||||
68: elaborate_drop<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:253:31
|
||||
69: rustc_mir_dataflow::elaborate_drops::elaborate_drop::<rustc_mir_transform::shim::DropShimElaborator>
|
||||
at ./compiler/rustc_mir_dataflow/src/elaborate_drops.rs:192:5
|
||||
70: build_drop_shim
|
||||
at ./compiler/rustc_mir_transform/src/shim.rs:283:13
|
||||
71: make_shim
|
||||
at ./compiler/rustc_mir_transform/src/shim.rs:128:13
|
||||
72: {closure#0}
|
||||
at ./compiler/rustc_query_impl/src/plumbing.rs:281:9
|
||||
[... omitted 22 frames ...]
|
||||
73: query_get_at<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::instance::InstanceKind, rustc_middle::query::erase::Erased<[u8; 8]>>>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:145:17
|
||||
74: mir_shims
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:423:31
|
||||
75: mir_shims
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:414:17
|
||||
76: instance_mir
|
||||
at ./compiler/rustc_middle/src/ty/mod.rs:1738:62
|
||||
77: try_instance_mir
|
||||
at ./compiler/rustc_mir_transform/src/inline.rs:1082:8
|
||||
78: try_inlining
|
||||
at ./compiler/rustc_mir_transform/src/inline.rs:194:27
|
||||
79: process_blocks
|
||||
at ./compiler/rustc_mir_transform/src/inline.rs:139:19
|
||||
80: inline
|
||||
at ./compiler/rustc_mir_transform/src/inline.rs:97:5
|
||||
81: run_pass
|
||||
at ./compiler/rustc_mir_transform/src/inline.rs:62:12
|
||||
82: run_passes_inner
|
||||
at ./compiler/rustc_mir_transform/src/pass_manager.rs:144:17
|
||||
83: rustc_mir_transform::pass_manager::run_passes
|
||||
at ./compiler/rustc_mir_transform/src/pass_manager.rs:87:5
|
||||
84: run_optimization_passes
|
||||
at ./compiler/rustc_mir_transform/src/lib.rs:561:5
|
||||
85: inner_optimized_mir
|
||||
at ./compiler/rustc_mir_transform/src/lib.rs:667:5
|
||||
86: optimized_mir
|
||||
at ./compiler/rustc_mir_transform/src/lib.rs:630:21
|
||||
87: {closure#0}
|
||||
at ./compiler/rustc_query_impl/src/plumbing.rs:285:13
|
||||
[... omitted 22 frames ...]
|
||||
88: query_get_at<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:145:17
|
||||
89: optimized_mir<rustc_span::def_id::LocalDefId>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:423:31
|
||||
90: optimized_mir<rustc_span::def_id::LocalDefId>
|
||||
at ./compiler/rustc_middle/src/query/plumbing.rs:414:17
|
||||
91: encode_mir
|
||||
at ./compiler/rustc_metadata/src/rmeta/encoder.rs:1656:74
|
||||
92: {closure#15}
|
||||
at ./compiler/rustc_metadata/src/rmeta/encoder.rs:639:29
|
||||
93: encode_crate_root
|
||||
at ./compiler/rustc_metadata/src/rmeta/encoder.rs:600:27
|
||||
94: encode_metadata
|
||||
at ./compiler/rustc_metadata/src/rmeta/encoder.rs:2269:16
|
||||
95: encode_and_write_metadata
|
||||
at ./compiler/rustc_metadata/src/fs.rs:65:13
|
||||
96: start_codegen
|
||||
at ./compiler/rustc_interface/src/passes.rs:1024:44
|
||||
97: {closure#0}
|
||||
at ./compiler/rustc_interface/src/queries.rs:122:35
|
||||
98: {closure#1}<rustc_interface::queries::{impl#5}::codegen_and_build_linker::{closure_env#0}, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_middle/src/ty/context.rs:1288:37
|
||||
99: {closure#0}<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_interface::queries::{impl#5}::codegen_and_build_linker::{closure_env#0}, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_middle/src/ty/context/tls.rs:82:9
|
||||
100: try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_interface::queries::{impl#5}::codegen_and_build_linker::{closure_env#0}, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>
|
||||
at ./library/std/src/thread/local.rs:283:12
|
||||
101: with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_interface::queries::{impl#5}::codegen_and_build_linker::{closure_env#0}, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>
|
||||
at ./library/std/src/thread/local.rs:260:9
|
||||
102: enter_context<rustc_middle::ty::context::{impl#19}::enter::{closure_env#1}<rustc_interface::queries::{impl#5}::codegen_and_build_linker::{closure_env#0}, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_middle/src/ty/context/tls.rs:79:5
|
||||
103: enter<rustc_interface::queries::{impl#5}::codegen_and_build_linker::{closure_env#0}, core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_middle/src/ty/context.rs:1288:9
|
||||
104: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<rustc_interface::queries::Linker, rustc_span::ErrorGuaranteed>, <rustc_interface::queries::Queries>::codegen_and_build_linker::{closure#0}>
|
||||
at ./compiler/rustc_interface/src/queries.rs:64:9
|
||||
105: codegen_and_build_linker
|
||||
at ./compiler/rustc_interface/src/queries.rs:121:9
|
||||
106: {closure#1}
|
||||
at ./compiler/rustc_driver_impl/src/lib.rs:451:26
|
||||
107: enter<rustc_driver_impl::run_compiler::{closure#0}::{closure_env#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_interface/src/queries.rs:202:19
|
||||
108: {closure#0}
|
||||
at ./compiler/rustc_driver_impl/src/lib.rs:389:22
|
||||
109: {closure#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>
|
||||
at ./compiler/rustc_interface/src/interface.rs:502:27
|
||||
110: {closure#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_interface/src/util.rs:154:13
|
||||
111: {closure#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_interface/src/util.rs:106:21
|
||||
112: set<rustc_span::SessionGlobals, rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at /home/michael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scoped-tls-1.0.1/src/lib.rs:137:9
|
||||
113: create_session_globals_then<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals::{closure#0}::{closure#0}::{closure_env#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>>
|
||||
at ./compiler/rustc_span/src/lib.rs:134:5
|
||||
114: {closure#0}<rustc_interface::util::run_in_thread_pool_with_globals::{closure_env#0}<rustc_interface::interface::run_compiler::{closure_env#1}<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure_env#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|
||||
at ./compiler/rustc_interface/src/util.rs:105:17
|
||||
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
|
||||
|
||||
error: 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: please make sure that you have updated to the latest nightly
|
||||
|
||||
note: rustc 1.81.0-dev running on x86_64-unknown-linux-gnu
|
||||
|
||||
note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/home/michael/.cargo -Z ignore-directory-in-diagnostics-source-blocks=/home/michael/programming/rust2/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z inline-mir=yes --crate-type lib
|
||||
|
||||
query stack during panic:
|
||||
#0 [evaluate_obligation] evaluating trait selection obligation `[Dorp; M]: core::marker::Copy`
|
||||
#1 [is_copy_raw] computing whether `[Dorp; M]` is `Copy`
|
||||
#2 [needs_drop_raw] computing whether `[Dorp; M]` needs drop
|
||||
#3 [mir_shims] generating MIR shim for `core::ptr::drop_in_place`
|
||||
#4 [optimized_mir] optimizing MIR for `drop`
|
||||
end of query stack
|
Loading…
Reference in New Issue
Block a user