Closed
Conversation
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
The invalid suggestion came from a wrongly created span in `rustc_parse' for closure arguments that didn't have a type specified. Specifically, the span in this case was the last token span, but in the case of tuples, the span represented the last parenthesis instead of the whole tuple, which is fixed by taking the more accurate span of the pattern.
merge functionality of `io::Sink` into `io::Empty` Many times, there is a need for a simple dummy `io::Read`er + `io::Write`r, but currently the only options are `io::Empty` and `io::Sink` respectively. Having both of their functionality together requires writing your own boilerplate for something that makes sense to have in the standard library. This PR adds the functionality of `io::Sink` to `io::Empty`, making `io::Empty` be able to perform the tasks of both of the previous structs. (This idea was first mentioned in rust-lang#24235) Note: I also updated some doc comments in `io::utils` in this pull request to fix inconsistencies between `io::Sink` and `io::Empty`. API Change Proposal: rust-lang/libs-team#49
`const`-stablilize `NonNull::as_ref` A bunch of pointer to reference methods have been made unstably const some time ago in rust-lang#91823 under the feature gate `const_ptr_as_ref`. Out of these, `NonNull::as_ref` can be implemented as a `const fn` in stable rust today, so i hereby propose to const stabilize this function only. Tracking issue: rust-lang#91822 `@rustbot` label +T-libs-api -T-libs
… r=albertlarsan68 clean stage-specific artifacts using `x clean --stage` fixes rust-lang#109313
…, r=petrochenkov Weaken unnameable_types lint `unnameable_types` lint is no longer emitted for - associated types - internal types r? `@petrochenkov`
…pkin Fix invalid suggestion for mismatched types in closure arguments This PR fixes the invalid suggestion for mismatched types in closure arguments. The invalid suggestion came from a wrongly created span in the parser for closure arguments that don't have a type specified. Specifically, the span in this case was the last token span, but in the case of tuples, the span represented the last parenthesis instead of the whole tuple, which is fixed by taking the more accurate span of the pattern. There is one unfortunate downside of this fix, it worsens even more the diagnostic for mismatched types in closure args without an explicit type. This happens because there is no correct span for implied inferred type. I tried also fixing this but it's a rabbit hole. Fixes rust-lang#114180
…sion, r=petrochenkov Simplify `Span::can_be_used_for_suggestions` a little tiny bit Just something I saw randomly.
Member
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Collaborator
|
⌛ Testing commit a58bc17 with merge 9b05741fca90f8c64c5943ff7a347749ddc47d92... |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
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.
Successful merges:
io::Sinkintoio::Empty#98154 (merge functionality ofio::Sinkintoio::Empty)const-stablilizeNonNull::as_ref#102198 (const-stablilizeNonNull::as_ref)x clean --stage#114126 (clean stage-specific artifacts usingx clean --stage)Span::can_be_used_for_suggestionsa little tiny bit #114258 (SimplifySpan::can_be_used_for_suggestionsa little tiny bit)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup