fix: avoid array len type mismatch with string panic - #23019
Merged
ChayimFriedman2 merged 1 commit intoAug 5, 2026
Merged
Conversation
ChayimFriedman2
requested changes
Aug 3, 2026
| } | ||
|
|
||
| #[test] | ||
| fn invalid_array_len_string_literal_does_not_panic() { |
Contributor
There was a problem hiding this comment.
The test should not be here, or in any ide- crate.
Contributor
Author
|
@rustbot ready |
ChayimFriedman2
requested changes
Aug 4, 2026
| }, | ||
| traits::StoredParamEnvAndCrate, | ||
| }; | ||
| use base_db::Crate; |
Contributor
There was a problem hiding this comment.
Why all these changed position? Please revert that.
Contributor
Author
There was a problem hiding this comment.
it seems that after I remove the never stmt and ran the command cargo fmt, the imports are reordered.
Contributor
There was a problem hiding this comment.
You probably have different rustfmt settings.
Contributor
There was a problem hiding this comment.
Ah that's because you also removed the newline after.
Contributor
Author
There was a problem hiding this comment.
oh thanks for pointing out! i add the newline back, and it'is fine now.
edragain2nd
force-pushed
the
fix/array_len_string_literal_mismatch
branch
from
August 4, 2026 17:37
f8a6f61 to
7ee9a18
Compare
add a regression test
edragain2nd
force-pushed
the
fix/array_len_string_literal_mismatch
branch
from
August 4, 2026 23:39
7ee9a18 to
d9d4b1a
Compare
ChayimFriedman2
approved these changes
Aug 4, 2026
glslang
added a commit
to glslang/agent-skills
that referenced
this pull request
Aug 6, 2026
Three self-contradictions in address-pr-comments (#7), each a rule in one section silently overridden by a rule in another. The judge/advisory split had no effect: section 9's first gate rejected any `open` row, and an advisory nit the stop policy declined to fix stayed `open` forever. Ledger rows now carry `weight`, and `noted` is a terminal status for an advisory ask deliberately left — legal only on an advisory row, so a judge's finding still cannot leave the gate unaddressed. "Just the blocking ones" filtered on `pullRequestReview.state`, which is frozen when the review is submitted. A reviewer who requests changes and later approves leaves those comments joined to a CHANGES_REQUESTED object permanently (confirmed on rust-lang/rust-analyzer#23019, where the current verdict is APPROVED). Section 2 now folds the review history to one current verdict per author, dropping COMMENTED since GitHub does not treat it as a verdict; the filter and section 9's gate both read that instead. The no-gh fork fallback produced a checkout with no upstream, so section 5's push died on "no upstream branch" after the fixes were already written. Section 0 now establishes the push target at checkout time and names the case where there is none — a fork without "allow edits from maintainers", where the sweep must be replies-only rather than commits nobody can deliver. Also swept the file for the same pattern: judge weight keyed to the reviewer rather than their current verdict, "every judge is satisfied" not read as "must have approved", GitHub's resolved flag separated from ledger status, and sections 6 and 8 taught the new status. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
fixes #22955
the root cause is that in function
intern_const_refwhen value isLiteral::String, it buildsValTreeKind::Branchwithout checking the typekind (likeTyKind::Uint),and in function
render_const_scalar_from_valtree_innerit calls functionto_leaf.to_leafpanics on theValTreeKind::Branch.I modify the condition so we only build
ValTreeKind::Branchwhen the type is compatible.but now it can reach the
never!stmtment which cause panic again.I remove the stmtent and I wonder the remove is suitable or not.