dont ICE when ConstKind::Expr for is_const_evaluatable#116740
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 12, 2023
Merged
dont ICE when ConstKind::Expr for is_const_evaluatable#116740bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
Collaborator
|
Some changes occurred in cc @BoxyUwU |
Member
|
I dont think this is the right solution. It's fine for |
e43e5d0 to
9d4ab9d
Compare
Contributor
Author
|
@rustbot ready |
BoxyUwU
reviewed
Nov 18, 2023
| }; | ||
| Some(err) | ||
| } | ||
| ty::ConstKind::Expr(_) => None, |
Member
There was a problem hiding this comment.
we should still actually emit an error for these failures imo
9d4ab9d to
4a7da1a
Compare
BoxyUwU
requested changes
Dec 8, 2023
| let mut err = self | ||
| .tcx | ||
| .sess | ||
| .struct_span_err(span, "evaluation of ConstKind::Expr is not supported"); |
Member
There was a problem hiding this comment.
"ConstKind::Expr" is not something that should be exposed to users. really the message should be the same as for ConstKind::Unevaluated except that instead of using the source map stuff we should just print the const out using {}
4a7da1a to
69a2bd6
Compare
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2023
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#116740 (dont ICE when ConstKind::Expr for is_const_evaluatable) - rust-lang#117914 (On borrow return type, suggest borrowing from arg or owned return type) - rust-lang#117927 (Clarify how to choose a FutureIncompatibilityReason variant.) - rust-lang#118855 (Improve an error involving attribute values.) - rust-lang#118856 (rustdoc-search: clean up parser) - rust-lang#118865 (rustc_codegen_llvm: Enforce `rustc::potential_query_instability` lint) - rust-lang#118866 (llvm-wrapper: adapt for LLVM API change) - rust-lang#118868 (Correctly gate the parsing of match arms without body) - rust-lang#118877 (tests: CGU tests require build-pass, not check-pass (remove FIXME)) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2023
Rollup merge of rust-lang#116740 - lenko-d:const_evaluatable_failed_for_non_unevaluated_const, r=BoxyUwU dont ICE when ConstKind::Expr for is_const_evaluatable The problem is that we are not handling ConstKind::Expr inside report_not_const_evaluatable_error Fixes [rust-lang#114151]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem is that we are not handling ConstKind::Expr inside report_not_const_evaluatable_error
Fixes [#114151]