Allow monomorphization time const eval failures if the cause is a type layout issue#124516
Allow monomorphization time const eval failures if the cause is a type layout issue#124516bors merged 2 commits intorust-lang:masterfrom
Conversation
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
RalfJung
left a comment
There was a problem hiding this comment.
r=me with the comment nit -- but I think this does not entirely solve the problem; I just don't have the time to try and find an example right now
| err_inval!(Layout(LayoutError::ReferencesError(guar))) => { | ||
| ErrorHandled::Reported(guar.into(), span.unwrap_or(DUMMY_SP)) | ||
| } | ||
| err_inval!(Layout(LayoutError::ReferencesError(guar))) => ErrorHandled::Reported( |
There was a problem hiding this comment.
What if there is aSizeOverflow in a promoted?
This PR seems like a good step so I am okay with landing it, but it seems to me there's still a potential for ICEs here.
There was a problem hiding this comment.
I added a test for promoteds. On master we got a bogus "erroneous constant" note. Now it's gone.
There was a problem hiding this comment.
I was specifically wondering about SizeOverflow as that's a different LayoutError variant that would bypass your new case here,
|
@bors r=RalfJung rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#124297 (Allow coercing functions whose signature differs in opaque types in their defining scope into a shared function pointer type) - rust-lang#124516 (Allow monomorphization time const eval failures if the cause is a type layout issue) - rust-lang#124976 (rustc: Use `tcx.used_crates(())` more) - rust-lang#125210 (Cleanup: Fix up some diagnostics) - rust-lang#125409 (Rename `FrameworkOnlyWindows` to `RawDylibOnlyWindows`) - rust-lang#125416 (Use correct param-env in `MissingCopyImplementations`) - rust-lang#125421 (Rewrite `core-no-oom-handling`, `issue-24445` and `issue-38237` `run-make` tests to new `rmake.rs` format) - rust-lang#125438 (Remove unneeded string conversion) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124516 - oli-obk:taint_const_eval, r=RalfJung Allow monomorphization time const eval failures if the cause is a type layout issue r? `@RalfJung` fixes rust-lang#124348
r? @RalfJung
fixes #124348