-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Don't ICE when trying to copy unsized value in const prop #102559
Conversation
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
I think #101168 will just take care of this, but that's a bit far off to being merged. Maybe we can avoid this function from being called at all from const prop by checking something in the const propagator instead of modifying the mir interpreter? |
The better fix would be to change ConstProp to not hit this part of the interpreter. I am not a fan of compromising the interpreter to account for all the ways in which ConstProp is misusing its APIs... But given that we already have |
07abf15
to
4889c6b
Compare
Some changes occurred in src/tools/cargo cc @ehuss Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Oops, updated submodules by accident. 🤦 |
4889c6b
to
c7d1ec0
Compare
@oli-obk: This isn't fixed by #101168, or at least the draft version that's in that PR right now. We could alternatively check for any trivial predicates in a function's param-env that look like |
@bors r+ rollup |
Rollup of 6 pull requests Successful merges: - rust-lang#101189 (Implement `Ready::into_inner()`) - rust-lang#101642 (Fix in-place collection leak when remaining element destructor panic) - rust-lang#102489 (Normalize substs before resolving instance in `NoopMethodCall` lint) - rust-lang#102559 (Don't ICE when trying to copy unsized value in const prop) - rust-lang#102568 (Lint against nested opaque types that don't satisfy associated type bounds) - rust-lang#102633 (Fix rustdoc ICE in invalid_rust_codeblocks lint) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
When we have a trivially false where-clause predicate like
Self: Sized
whereSelf = dyn Trait
, we sometimes don't throw an error during typeck for an illegal operation such as copying an unsized type.This, unfortunately, cannot be made into an error (at least not without some migration -- see #95611 for example), but we should at least not ICE, since this function will never actually be reachable from main, for example.
r? @RalfJung since I think you added these assertions? but feel free to reassign.
Fixes #102553