Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e1b28cd

Browse files
committedAug 19, 2022
Auto merge of #100740 - Dylan-DPC:rollup-0td6yq4, r=Dylan-DPC
Rollup of 9 pull requests Successful merges: - #99576 (Do not allow `Drop` impl on foreign fundamental types) - #100081 (never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn)) - #100208 (make NOP dyn casts not require anything about the vtable) - #100494 (Cleanup rustdoc themes) - #100522 (Only check the `DefId` for the recursion check in MIR inliner.) - #100592 (Manually implement Debug for ImportKind.) - #100598 (Don't fix builtin index when Where clause is found) - #100721 (Add diagnostics lints to `rustc_type_ir` module) - #100731 (rustdoc: count deref and non-deref as same set of used methods) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 468887e + ecd2885 commit e1b28cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+851
-992
lines changed
 

‎compiler/rustc_codegen_cranelift/src/unsize.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub(crate) fn unsized_info<'tcx>(
2929
let old_info =
3030
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
3131
if data_a.principal_def_id() == data_b.principal_def_id() {
32+
// A NOP cast that doesn't actually change anything, should be allowed even with invalid vtables.
3233
return old_info;
3334
}
3435

‎compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ pub fn unsized_info<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
151151
let old_info =
152152
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
153153
if data_a.principal_def_id() == data_b.principal_def_id() {
154+
// A NOP cast that doesn't actually change anything, should be allowed even with invalid vtables.
154155
return old_info;
155156
}
156157

0 commit comments

Comments
 (0)
Please sign in to comment.