-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Fix suggestion when there were a colon already in generics #148405
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
Merged
Merged
+59
−12
Conversation
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
|
r? @davidtwco rustbot has assigned @davidtwco. Use |
JonathanBrouwer
requested changes
Nov 2, 2025
compiler/rustc_trait_selection/src/error_reporting/infer/region.rs
Outdated
Show resolved
Hide resolved
|
r=me after addressing the comment & ci is green |
41d65da to
4e17091
Compare
|
@rustbot ready |
|
@bors r+ rollup |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 2, 2025
…uwer Fix suggestion when there were a colon already in generics Finally found time to fix rust-lang#144215 I don't feel like this `colon_flag` is perfect solution and that it can be refactored, but I'd say that this is pretty good as it, I was tried to refactor this a little, but the thing is the scope where `param.colon_span` lives is very limited, so there is not much time to check was there colon or not, I tried to rewrite this into more functional style to address this, but it becomes way more unreadable than this one or even less performant, maybe some comments could push readability of this fix further, maybe a comment for enum or `colon_flag`?
This was referenced Nov 2, 2025
bors
added a commit
that referenced
this pull request
Nov 2, 2025
Rollup of 7 pull requests Successful merges: - #146573 (Constify Range functions) - #146699 (Add `is_ascii` function optimized for LoongArch64 for [u8]) - #148026 (std: don't leak the thread closure if destroying the thread attributes fails) - #148135 (Ignore unix socket related tests for VxWorks) - #148211 (clippy fixes and code simplification) - #148395 (Generalize branch references) - #148405 (Fix suggestion when there were a colon already in generics) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Nov 3, 2025
Rollup merge of #148405 - Kivooeo:static-span, r=JonathanBrouwer Fix suggestion when there were a colon already in generics Finally found time to fix #144215 I don't feel like this `colon_flag` is perfect solution and that it can be refactored, but I'd say that this is pretty good as it, I was tried to refactor this a little, but the thing is the scope where `param.colon_span` lives is very limited, so there is not much time to check was there colon or not, I tried to rewrite this into more functional style to address this, but it becomes way more unreadable than this one or even less performant, maybe some comments could push readability of this fix further, maybe a comment for enum or `colon_flag`?
github-actions bot
pushed a commit
to rust-lang/rust-analyzer
that referenced
this pull request
Nov 3, 2025
Rollup of 7 pull requests Successful merges: - rust-lang/rust#146573 (Constify Range functions) - rust-lang/rust#146699 (Add `is_ascii` function optimized for LoongArch64 for [u8]) - rust-lang/rust#148026 (std: don't leak the thread closure if destroying the thread attributes fails) - rust-lang/rust#148135 (Ignore unix socket related tests for VxWorks) - rust-lang/rust#148211 (clippy fixes and code simplification) - rust-lang/rust#148395 (Generalize branch references) - rust-lang/rust#148405 (Fix suggestion when there were a colon already in generics) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Nov 3, 2025
Rollup of 7 pull requests Successful merges: - rust-lang/rust#146573 (Constify Range functions) - rust-lang/rust#146699 (Add `is_ascii` function optimized for LoongArch64 for [u8]) - rust-lang/rust#148026 (std: don't leak the thread closure if destroying the thread attributes fails) - rust-lang/rust#148135 (Ignore unix socket related tests for VxWorks) - rust-lang/rust#148211 (clippy fixes and code simplification) - rust-lang/rust#148395 (Generalize branch references) - rust-lang/rust#148405 (Fix suggestion when there were a colon already in generics) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Nov 3, 2025
Rollup of 7 pull requests Successful merges: - rust-lang/rust#146573 (Constify Range functions) - rust-lang/rust#146699 (Add `is_ascii` function optimized for LoongArch64 for [u8]) - rust-lang/rust#148026 (std: don't leak the thread closure if destroying the thread attributes fails) - rust-lang/rust#148135 (Ignore unix socket related tests for VxWorks) - rust-lang/rust#148211 (clippy fixes and code simplification) - rust-lang/rust#148395 (Generalize branch references) - rust-lang/rust#148405 (Fix suggestion when there were a colon already in generics) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Finally found time to fix #144215
I don't feel like this
colon_flagis perfect solution and that it can be refactored, but I'd say that this is pretty good as it, I was tried to refactor this a little, but the thing is the scope whereparam.colon_spanlives is very limited, so there is not much time to check was there colon or not, I tried to rewrite this into more functional style to address this, but it becomes way more unreadable than this one or even less performant, maybe some comments could push readability of this fix further, maybe a comment for enum orcolon_flag?