Skip to content

Allow --cfg on rustpkg test #10282

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

Merged
merged 1 commit into from
Nov 5, 2013
Merged

Conversation

sfackler
Copy link
Member

@sfackler sfackler commented Nov 5, 2013

Closes #10238

@@ -252,7 +252,7 @@ pub fn flags_forbidden_for_cmd(flags: &RustcFlags,
return true;
}

if !cfgs.is_empty() && cmd != "build" && cmd != "install" {
if !cfgs.is_empty() && cmd != "build" && cmd != "install" && cmd != "test" {
println("The --cfg option can only be used with the build or install commands.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test too

@sfackler
Copy link
Member Author

sfackler commented Nov 5, 2013

@huonw Oops, fixed

@bors bors merged commit 4b9c5d6 into rust-lang:master Nov 5, 2013
@sfackler sfackler deleted the rustpkg-test-cfg branch December 23, 2013 03:56
blyxyas pushed a commit to blyxyas/rust that referenced this pull request Jan 3, 2024
… r=blyxyas

feature: add new lint `pub_underscore_fields`

fixes: rust-lang#10282

This PR introduces a new lint `pub_underscore_fields` that lints when a user has marked a field of a struct as public, but also prefixed it with an underscore (`_`). This is something users should avoid because the two ideas are contradictory. Prefixing a field with an `_` is inferred as the field being unused, but making a field public infers that it will be used.

- \[x] Followed [lint naming conventions][lint_naming]
  - I believe I followed the naming conventions, more than happy to update the naming if I did not :)
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[x] Executed `cargo dev update_lints`
- \[x] Added lint documentation
- \[x] Run `cargo dev fmt`

---

changelog: new lint: [`pub_underscore_fields`]
[rust-lang#10283](rust-lang/rust-clippy#10283)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustpkg test claims to support --cfg but doesn't
4 participants