Uh oh!
There was an error while loading. Please reload this page.
Add more type signatures to the docs; tweak a few of them. - #13458
Closed
huonw wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Shouldn't this be my_writer?
ContributorAuthor
There was a problem hiding this comment.
Yeah, unfortunately this test case was ignored so it wasn't picked up automatically. (Both the misnaming and the ignore have been fixed.)
alexcrichton
commented
Apr 11, 2014
Member
r=me with just a small nit |
Someone reading the docs won't know what the types of various things are, so this adds them in a few meaningful places to help with comprehension. cc rust-lang#13423.
bors added a commit
that referenced
this pull request
Apr 11, 2014
Add more type signatures to the docs; tweak a few of them. Someone reading the docs won't know what the types of various things are, so this adds them in a few meaningful places to help with comprehension. cc #13423.
arcnmx pushed a commit
to arcnmx/rust
that referenced
this pull request
Jan 9, 2023
…saturating, r=Veykril add wrapping/checked/saturating assist This addresses rust-lang#13452 I'm not sure about the structure of the code. I'm not sure if it needs to be 3 separate assists, and if that means it needs to be in 3 separate files as well. Most of the logic is in `util.rs`, which feels funny to me, but there seems to be a pattern of 1 assist per file, and this seems better than duplicating the logic. Let me know if anything needs changes 😁
flip1995 pushed a commit
to flip1995/rust
that referenced
this pull request
Oct 10, 2024
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
rust-cloud-vmsBot
pushed a commit
to liwagu/rust
that referenced
this pull request
Oct 10, 2024
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
flip1995 pushed a commit
to flip1995/rust
that referenced
this pull request
Oct 18, 2024
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
flip1995 pushed a commit
to flip1995/rust
that referenced
this pull request
Oct 18, 2024
Don't warn on proc macro generated code in `needless_return` Fixesrust-lang#13458Fixesrust-lang#13457Fixesrust-lang#13467Fixesrust-lang#13479Fixesrust-lang#13481Fixesrust-lang#13526Fixesrust-lang#13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
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 freeto 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.
Add more type signatures to the docs; tweak a few of them.
Someone reading the docs won't know what the types of various things
are, so this adds them in a few meaningful places to help with
comprehension.
cc #13423.