Suggest adding a #[cfg(test)] to to a test module#91770
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 21, 2021
Merged
Suggest adding a #[cfg(test)] to to a test module#91770bors merged 1 commit intorust-lang:masterfrom
#[cfg(test)] to to a test module#91770bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
#[cfg(test)] to to a test module#[cfg(test)] to to a test module
camelid
reviewed
Dec 12, 2021
Comment on lines
19
to
23
Member
There was a problem hiding this comment.
Seems like it'd be good to add tests for out-of-line modules too (i.e,, mod test;). But I'm not sure how feasible it is to test that.
Member
|
This looks great to me. I posted one comment about the proposed diagnostic message; with that changed, r=me. |
e343965 to
4103248
Compare
Member
|
Also, please squash your commits if you can :) |
remove a empty line
import `module_to_string`
use `contains("test")`
show a suggestion in case module starts_with/ends_with "test"
replace `parent` with `containing`
4103248 to
6f8ad6d
Compare
Member
|
@bors r=joshtriplett |
Collaborator
|
📌 Commit 6f8ad6d has been approved by |
Collaborator
|
⌛ Testing commit 6f8ad6d with merge e6c58674ebb4b3aeded006ee47526f6ec77d97e0... |
Collaborator
|
💔 Test failed - checks-actions |
Member
|
@bors retry docker.io 503 |
Collaborator
|
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot) |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 21, 2021
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#90345 (Stabilise entry_insert) - rust-lang#91412 (Improve suggestions for importing out-of-scope traits reexported as `_`) - rust-lang#91770 (Suggest adding a `#[cfg(test)]` to to a test module) - rust-lang#91823 (Make `PTR::as_ref` and similar methods `const`.) - rust-lang#92127 (Move duplicates removal when generating results instead of when displaying them) - rust-lang#92129 (JoinHandle docs: add missing 'the') - rust-lang#92131 (Sync rustc_codegen_cranelift) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
May 17, 2022
…-add-cfg-test, r=cjgillot Omit unnecessary help to add `#[cfg(test)]` when already annotated Closes: rust-lang#96611 The related PR is: rust-lang#91770
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jul 17, 2022
…ler-errors Add `#[test]` to functions in test modules I implemented a suggestion in rust-lang#91770, but the ui test I created was inadequate and I have fixed that.
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.
closes #88138