-
Notifications
You must be signed in to change notification settings - Fork 13.4k
transmutability: fix ICE when passing wrong ADT to ASSUME #136730
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
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.
An extremely tiny nit, but otherwise LGTM!
compiler/rustc_transmute/src/lib.rs
Outdated
); | ||
if !tcx.is_lang_item(adt_def.did(), LangItem::TransmuteOpts) { | ||
tcx.dcx().delayed_bug(format!( | ||
"The given `Const` was not marked with the `{}` lang item.", |
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.
"The given `Const` was not marked with the `{}` lang item.", | |
"The given `const` was not marked with the `{}` lang item.", |
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.
@bors r+ rollup
For the record, you need to invoke bors outside of an approval message, which is not a normal comment @bors r=jswrenn rollup |
TIL, thanks! |
transmutability: fix ICE when passing wrong ADT to ASSUME - Remove an incorrect assert that the `ASSUME` parameter has the type `Assume` and delay a bug instead. - Since we checked the type of `ASSUME` is `Assume` (an ADT), its valtree must be a branch, so we can just unwrap it. r? `@jswrenn`
…kingjubilee Rollup of 13 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`) - rust-lang#136397 (Add a comment pointing to ICE-136223) - rust-lang#136681 (resolve `llvm-config` path properly on cross builds) - rust-lang#136686 (Clean up `HashMap` and `HashSet` docs.) - rust-lang#136694 (Update minifier version to `0.3.4`) - rust-lang#136706 (compiler: mostly-finish `rustc_abi` updates) - rust-lang#136710 (Document `Sum::sum` returns additive identities for `[]`) - rust-lang#136724 (Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`) - rust-lang#136727 (Have a break from review rotation) - rust-lang#136730 (transmutability: fix ICE when passing wrong ADT to ASSUME) - rust-lang#136736 (Small resolve refactor) - rust-lang#136746 (Emit an error if `-Zdwarf-version=1` is requested) r? `@ghost` `@rustbot` modify labels: rollup
transmutability: fix ICE when passing wrong ADT to ASSUME - Remove an incorrect assert that the `ASSUME` parameter has the type `Assume` and delay a bug instead. - Since we checked the type of `ASSUME` is `Assume` (an ADT), its valtree must be a branch, so we can just unwrap it. r? ``@jswrenn``
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#136397 (Add a comment pointing to ICE-136223) - rust-lang#136681 (resolve `llvm-config` path properly on cross builds) - rust-lang#136686 (Clean up `HashMap` and `HashSet` docs.) - rust-lang#136694 (Update minifier version to `0.3.4`) - rust-lang#136706 (compiler: mostly-finish `rustc_abi` updates) - rust-lang#136710 (Document `Sum::sum` returns additive identities for `[]`) - rust-lang#136724 (Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`) - rust-lang#136727 (Have a break from review rotation) - rust-lang#136730 (transmutability: fix ICE when passing wrong ADT to ASSUME) - rust-lang#136736 (Small resolve refactor) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 8 pull requests Successful merges: - rust-lang#136397 (Add a comment pointing to ICE-136223) - rust-lang#136686 (Clean up `HashMap` and `HashSet` docs.) - rust-lang#136706 (compiler: mostly-finish `rustc_abi` updates) - rust-lang#136710 (Document `Sum::sum` returns additive identities for `[]`) - rust-lang#136724 (Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`) - rust-lang#136727 (Have a break from review rotation) - rust-lang#136730 (transmutability: fix ICE when passing wrong ADT to ASSUME) - rust-lang#136736 (Small resolve refactor) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136730 - lukas-code:trans-ice, r=jswrenn transmutability: fix ICE when passing wrong ADT to ASSUME - Remove an incorrect assert that the `ASSUME` parameter has the type `Assume` and delay a bug instead. - Since we checked the type of `ASSUME` is `Assume` (an ADT), its valtree must be a branch, so we can just unwrap it. r? ```@jswrenn```
ASSUME
parameter has the typeAssume
and delay a bug instead.ASSUME
isAssume
(an ADT), its valtree must be a branch, so we can just unwrap it.r? @jswrenn