Fix an LLVM assertion when matching against static strings#14752
Conversation
Member
There was a problem hiding this comment.
Oh interesting! With this change, could you see if the bitcast here could be removed?
Author
There was a problem hiding this comment.
I was actually looking at this just now and yes, it should be doable!
Author
|
Not entirely convinced this is the right way to fix it so I'd love to hear from someone who knows this stuff. But it boils down to the fact that const strings evaluate to a { i8_, i64 } struct which then cannot be Stored in a %str_slice_ pointer, even though it's a type alias (tripped on another LLVM assertion after I added the auto ref handling). An alternative, having a bit cast/pointer cast just for string slices in the matching code, seemed like a hack to me. |
bors
added a commit
that referenced
this pull request
Jun 10, 2014
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 5, 2023
…entation, r=Veykril fix: assists no longer break indentation Fixes rust-lang/rust-analyzer#14674 These are _ad hoc_ patches for a number of assists that can produce incorrectly indented code, namely: - generate_derive - add_missing_impl_members - add_missing_default_members Some general solution is required in future, as the same problem arises in many other assists, e.g. - replace_derive_with... - generate_default_from_enum... - generate_default_from_new - generate_delegate_methods (the list is incomplete)
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
May 15, 2025
changelog: [`type_repetition_in_bounds`]: include all generic bounds in suggestion, clearer message which now includes the repeated type name Fixes rust-lang/rust-clippy#14744
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 #8315
Fixes #11940