rustdoc: make calls of markdown::render safer#17796
Merged
Merged
Conversation
d3ca26c to
0b431d5
Compare
Member
There was a problem hiding this comment.
Could you actually include this task as part of the markdown module itself? It would otherwise need to move to run-pass-fulldeps (it depends on the compiler) and also have // ignore-android I believe.
Previously, external code might call `markdown::render()` without having called `markdown::reset_headers()`, meaning the TLS key `used_header_map` was unset. Now `markdown::render()` ensures that `used_header_map` is set by calling `reset_headers` if necessary. Fix rust-lang#17736
0b431d5 to
942bed7
Compare
Contributor
Author
|
Rebased |
bors
added a commit
that referenced
this pull request
Oct 6, 2014
…ichton Previously, external code might call `markdown::render()` without having called `markdown::reset_headers()`, meaning the TLS key `used_header_map` was unset. Now `markdown::render()` ensures that `used_header_map` is set by calling `reset_headers` if necessary. Fix #17736
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Sep 25, 2024
…-result, r=Veykril fix: use Result type aliases in "Wrap return type in Result" assist This commit makes the "Wrap return type in Result" assist prefer type aliases of standard library type when the are in scope, use at least one generic parameter, and have the name `Result`. The last restriction was made in an attempt to avoid false assumptions about which type the user is referring to, but that might be overly strict. We could also do something like this, in order of priority: * Use the alias named "Result". * Use any alias if only a single one is in scope, otherwise: * Use the standard library type. This is easy to add if others feel differently that is appropriate, just let me know. Fixes rust-lang#17796
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.
Previously, external code might call
markdown::render()without havingcalled
markdown::reset_headers(), meaning the TLS keyused_header_mapwas unset. Nowmarkdown::render()ensures thatused_header_mapis set by callingreset_headersif necessary.Fix #17736