-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 12 pull requests #79994
Merged
Merged
Rollup of 12 pull requests #79994
Conversation
This file contains 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
A colleague of mine is new to Rust, and mentioned that it was “slightly confusing” to figure out what `&mut` does in iterating over `&mut foo`: ```rust for value in &mut self.my_vec { // ... } ``` My colleague had read the `std::iter` docs and not found the answer there. There is a brief section at the top about “the three forms of iteration”, which mentions `iter_mut`, but it doesn’t cover the purpose of `&mut coll` for a collection `coll`. This patch adds an explanatory section to the docs. I opted to create a new section so that it can appear after the note that `impl<I: Iterator> IntoIterator for I`, and it’s nice for the existing “three forms of iteration” to appear near the top. Implementation note: I haven’t linkified the references to `HashSet` and `HashMap`, since those are in `std` and these docs are in `core`; linkifying them gave an “unresolved link” rustdoc error. Test Plan: Ran `./x.py doc library/core`, and the result looked good. Manually copy-pasted the two doctests into the playground and ran them. wchargin-branch: doc-iter-by-reference wchargin-source: 0f35369a8a735868621166608797744e97536792
wchargin-branch: doc-iter-by-reference wchargin-source: e4069ac9a9d73860467cea74cf3ae1605af37d74
Co-authored-by: Camelid <camelidcamel@gmail.com>
Suggested by withoutboats
bootstrap completely ignores all errors when detecting a rustup version, so this wasn't noticed before. Fixes the following error: ``` rustup not detected: a bytes-like object is required, not 'str' falling back to auto-detect ``` This also takes the opportunity to only call rustup and other external commands only once during startup.
…ns that return () (clippy::option_map_unit_fn)
Co-authored-by: Rémy Rakic <lqd@users.noreply.github.com>
The background was dark before, which made the text impossible to read. Now the background is white, which is how selected `div`s are rendered. As a result, the search results tabs now look identical to how they used to look (before rust-lang#79896).
In HTML, when a button follows an input, if the enter keep is pressed on the input, instead of sending the submit event to the input, it'll create a click event on the button following it, which in this case made the help popup show up whenever "enter" was pressed.
…ence, r=m-ou-se std::iter: document iteration over `&T` and `&mut T` A colleague of mine is new to Rust, and mentioned that it was “slightly confusing” to figure out what `&mut` does in iterating over `&mut foo`: ```rust for value in &mut self.my_vec { // ... } ``` My colleague had read the `std::iter` docs and not found the answer there. There is a brief section at the top about “the three forms of iteration”, which mentions `iter_mut`, but it doesn’t cover the purpose of `&mut coll` for a collection `coll`. This patch adds an explanatory section to the docs. I opted to create a new section so that it can appear after the note that `impl<I: Iterator> IntoIterator for I`, and it’s nice for the existing “three forms of iteration” to appear near the top. Test Plan: Ran `./x.py doc library/core`, and the result looked good, including links. Manually copy-pasted the two doctests into the playground and ran them. wchargin-branch: doc-iter-by-reference
Link loop/for keyword Even though the reference already have all of these, I am just adding related keywords in the see also to let others easily click on the related keyword.
…ark-Simulacrum Remove deprecated linked_list_extras methods. rust-lang#27794 (comment): > I'd say give it about 2 weeks then remove them. It's been 18 weeks. Time to remove them. :) Closes rust-lang#27794.
Fix rustup support in default_build_triple for python3 bootstrap completely ignores all errors when detecting a rustup version, so this wasn't noticed before. Fixes the following error: ``` rustup not detected: a bytes-like object is required, not 'str' falling back to auto-detect ``` This also takes the opportunity to only call rustup and other external commands only once during startup. Follow-up to rust-lang#78513.
fix more clippy::complexity findings fix clippy::unnecessary_filter_map use if let Some(x) = .. instead of ...map(|x|) to conditionally run fns that return () (clippy::option_map_unit_fn) fix clippy::{needless_bool, manual_unwrap_or} don't clone types that are copy (clippy::clone_on_copy) don't convert types into identical types with .into() (clippy::useless_conversion) use strip_prefix over slicing (clippy::manual_strip) r? ``@Dylan-DPC``
Add post-init hook for static memory for miri. Adds a post-initialization hook to treat memory initialized using the interpreter as if it was initialized in a static context. See: rust-lang/miri#1644 & rust-lang/miri#1643
…acrum Fix building compiler docs with stage 0 This regressed in rust-lang#79525 (see https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Can't.20document.20single.20crate). r? `@Mark-Simulacrum`
…lan-DPC Fix typo in `DebruijnIndex` documentation Suggested in rust-lang#79169 (comment). r? ``@lqd``
…, r=Mark-Simulacrum Misc rustbuild improvements when the LLVM backend isn't used * Don't checkout llvm-project * Don't require cmake and ninja Fixes rust-lang#78564
…=GuillaumeGomez rustdoc light theme: Fix CSS for selected buttons Fixes rust-lang#79961. The background was dark before, which made the text impossible to read. Now the button doesn't override the background, and the only thing it does is add a light-blue top border. Ultimately, the search results tabs now look very similar to how they used to look. r? `@GuillaumeGomez`
Remove an unused dependency that made `rustdoc` crash Whilst struggling with rust-lang#79980 I discovered that this dependency was unused, and that made rustdoc crash. This PR removes it.
…jyn514 Fixes submit event of the search input Fixes rust-lang#79960 It's a very funny corner case: In HTML, when a button follows an input (in a `form`), if the enter keep is pressed on the input, instead of sending the submit event to the input, it'll create a click event on the button following it, which in this case made the help popup show up whenever "enter" was pressed. cc `@camelid` r? `@jyn514`
@bors r+ rollup=never p=5 |
📌 Commit 3213089 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Dec 13, 2020
☀️ Test successful - checks-actions |
This was referenced Dec 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
&T
and&mut T
#79360 (std::iter: document iteration over&T
and&mut T
)DebruijnIndex
documentation #79963 (Fix typo inDebruijnIndex
documentation)rustdoc
crash #79984 (Remove an unused dependency that maderustdoc
crash)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup