-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
add delay_span_bug to TransmuteSizeDiff, just to be sure #70139
Conversation
src/librustc_mir/interpret/place.rs
Outdated
@@ -926,6 +926,7 @@ where | |||
// most likey we *are* running `typeck` right now. Investigate whether we can bail out | |||
// on `typeck_tables().has_errors` at all const eval entry points. | |||
debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest); | |||
self.tcx.sess.delay_span_bug(self.tcx.span, "size-changing transmute"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention how transmute checking should've failed, in the message.
(Because that's the reason this should never actually become an ICE in practice)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, when I said "better safe than sorry" I meant the current approach, not delay_span_bug
, but using both is doubly safe :P.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using just delay_span_bug
is not an option, so I figured the safe variant is to use both. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eddyb updated message
@bors r+ |
📌 Commit 4a2d54d has been approved by |
add delay_span_bug to TransmuteSizeDiff, just to be sure See rust-lang#69839 (comment). r? @eddyb
Rollup of 16 pull requests Successful merges: - rust-lang#65097 (Make std::sync::Arc compatible with ThreadSanitizer) - rust-lang#69033 (Use generator resume arguments in the async/await lowering) - rust-lang#69997 (add `Option::{zip,zip_with}` methods under "option_zip" gate) - rust-lang#70038 (Remove the call that makes miri fail) - rust-lang#70058 (can_begin_literal_maybe_minus: `true` on `"-"? lit` NTs.) - rust-lang#70111 (BTreeMap: remove shared root) - rust-lang#70139 (add delay_span_bug to TransmuteSizeDiff, just to be sure) - rust-lang#70165 (Remove the erase regions MIR transform) - rust-lang#70166 (Derive PartialEq, Eq and Hash for RangeInclusive) - rust-lang#70176 (Add tests for rust-lang#58319 and rust-lang#65131) - rust-lang#70177 (Fix oudated comment for NamedRegionMap) - rust-lang#70184 (expand_include: set `.directory` to dir of included file.) - rust-lang#70187 (more clippy fixes) - rust-lang#70188 (Clean up E0439 explanation) - rust-lang#70189 (Abi::is_signed: assert that we are a Scalar) - rust-lang#70194 (#[must_use] on split_off()) Failed merges: r? @ghost
See #69839 (comment).
r? @eddyb