diff options
| author | bors <bors@rust-lang.org> | 2024-12-24 00:51:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-24 00:51:51 +0000 |
| commit | f3343420c813a3dad6746e274137ba51bf97f063 (patch) | |
| tree | acd07ddc77abe529bb44f588d71f7bb43b4655c1 /compiler/rustc_mir_transform | |
| parent | 65fe42a5f46a17ac63b21684b7ec8327f1a4c86b (diff) | |
| parent | 9a1c5eb5b385adb3cd04af0049cbf5c225cefdc3 (diff) | |
| download | rust-f3343420c813a3dad6746e274137ba51bf97f063.tar.gz rust-f3343420c813a3dad6746e274137ba51bf97f063.zip | |
Auto merge of #134625 - compiler-errors:unsafe-binders-ty, r=oli-obk
Begin to implement type system layer of unsafe binders Mostly TODOs, but there's a lot of match arms that are basically just noops so I wanted to split these out before I put up the MIR lowering/projection part of this logic. r? oli-obk Tracking: - https://github.com/rust-lang/rust/issues/130516
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/dataflow_const_prop.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/lint_tail_expr_drop_order.rs | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs index 7594583c4ad..cc44114782c 100644 --- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs +++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs @@ -932,7 +932,8 @@ fn try_write_constant<'tcx>( | ty::Closure(..) | ty::CoroutineClosure(..) | ty::Coroutine(..) - | ty::Dynamic(..) => throw_machine_stop_str!("unsupported type"), + | ty::Dynamic(..) + | ty::UnsafeBinder(_) => throw_machine_stop_str!("unsupported type"), ty::Error(_) | ty::Infer(..) | ty::CoroutineWitness(..) => bug!(), } diff --git a/compiler/rustc_mir_transform/src/lint_tail_expr_drop_order.rs b/compiler/rustc_mir_transform/src/lint_tail_expr_drop_order.rs index 7fb421dea0c..e5a183bc75c 100644 --- a/compiler/rustc_mir_transform/src/lint_tail_expr_drop_order.rs +++ b/compiler/rustc_mir_transform/src/lint_tail_expr_drop_order.rs @@ -285,7 +285,9 @@ fn ty_dtor_span<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<Span> { | ty::Placeholder(_) | ty::Infer(_) | ty::Slice(_) - | ty::Array(_, _) => None, + | ty::Array(_, _) + | ty::UnsafeBinder(_) => None, + ty::Adt(adt_def, _) => { let did = adt_def.did(); let try_local_did_span = |did: DefId| { |
