-
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
Allow monomorphization time const eval failures if the cause is a type layout issue #124516
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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