Move core::run tests of process killing into standalone run-pass tests#6228
Closed
brson wants to merge 1 commit intorust-lang:incomingfrom
Closed
Move core::run tests of process killing into standalone run-pass tests#6228brson wants to merge 1 commit intorust-lang:incomingfrom
brson wants to merge 1 commit intorust-lang:incomingfrom
Conversation
These cause valgrind errors in subprocesses. I don't *think* these errors lead to actual test failures but they are very confusing.
bors
added a commit
that referenced
this pull request
May 7, 2013
These cause valgrind errors in subprocesses. I don't *think* these errors lead to actual test failures but they are very confusing.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Sep 9, 2022
Unlike past similar work done in rust-lang#6228, expand the existing `or_fun_call` lint to detect `or_insert` calls with a `T::new()` or `T::default()` argument, much like currently done for `unwrap_or` calls. In that case, suggest the use of `or_default`, which is more idiomatic. Note that even with this change, `or_insert_with(T::default)` calls aren't detected as candidates for `or_default()`, in the same manner that currently `unwrap_or_else(T::default)` calls aren't detected as candidates for `unwrap_or_default()`. Also, as a nearby cleanup, change `KNOW_TYPES` from `static` to `const`, since as far as I understand it's preferred (should Clippy have a lint for that?). Fixes rust-lang#3812.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Sep 9, 2022
Suggest `Entry::or_default` for `Entry::or_insert(Default::default())` Unlike past similar work done in rust-lang#6228, expand the existing `or_fun_call` lint to detect `or_insert` calls with a `T::new()` or `T::default()` argument, much like currently done for `unwrap_or` calls. In that case, suggest the use of `or_default`, which is more idiomatic. Note that even with this change, `or_insert_with(T::default)` calls aren't detected as candidates for `or_default()`, in the same manner that currently `unwrap_or_else(T::default)` calls aren't detected as candidates for `unwrap_or_default()`. Also, as a nearby cleanup, change `KNOW_TYPES` from `static` to `const`, since as far as I understand it's preferred (should Clippy have a lint for that?). Addresses rust-lang#3812. *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: [`or_fun_call`]: Suggest `Entry::or_default` for `Entry::or_insert(Default::default())`
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.
These cause valgrind errors in subprocesses. I don't think these errors
lead to actual test failures but they are very confusing.