Skip to content
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

Lint against lowercase static mut #37162

Merged
merged 3 commits into from Oct 17, 2016

Conversation

Projects
None yet
6 participants
@matklad
Copy link
Member

matklad commented Oct 14, 2016

Closes #37145.

Lint for non mut statics was added in #7523, and it explicitly did not cover mut statics. I am not sure why.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 14, 2016

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@matklad matklad force-pushed the matklad:static-mut-lint branch from 99fb4fe to bfe267a Oct 14, 2016

@matklad matklad force-pushed the matklad:static-mut-lint branch 2 times, most recently from 5147918 to 6f216f6 Oct 14, 2016

@matklad matklad force-pushed the matklad:static-mut-lint branch from 6f216f6 to 72399f2 Oct 14, 2016

@jseyfried
Copy link
Contributor

jseyfried left a comment

Thanks! r=me with the comment addressed.

hir::ItemStatic(_, hir::MutImmutable, _) => {
NonUpperCaseGlobals::check_upper_case(cx, "static constant", it.name, it.span);
}
hir::ItemStatic(_, hir::MutMutable, _) => {
NonUpperCaseGlobals::check_upper_case(cx, "static variable", it.name, it.span);
}

This comment has been minimized.

@jseyfried

jseyfried Oct 15, 2016

Contributor

I think the above two arms could be merged into a single arm:

    hir::ItemStatic(..) => {
        NonUpperCaseGlobals::check_upper_case(cx, "static variable", it.name, it.span);
    }
@jseyfried

This comment has been minimized.

Copy link
Contributor

jseyfried commented Oct 17, 2016

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 17, 2016

📌 Commit 066d62d has been approved by jseyfried

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 17, 2016

⌛️ Testing commit 066d62d with merge 07b86d0...

bors added a commit that referenced this pull request Oct 17, 2016

Auto merge of #37162 - matklad:static-mut-lint, r=jseyfried
Lint against lowercase static mut

Closes #37145.

Lint for non mut statics was added in #7523, and it explicitly did not cover mut statics. I am not sure why.
@matklad

This comment has been minimized.

Copy link
Member Author

matklad commented Oct 17, 2016

This may produce new warnings. Should the relnotes label be applied?

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 17, 2016

Yeah, let's tag

@bors bors merged commit 066d62d into rust-lang:master Oct 17, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.