Skip to content

Lint against lowercase static mut - #37162

Merged
bors merged 3 commits into
rust-lang:masterfrom
matklad:static-mut-lint
Oct 17, 2016
Merged

Lint against lowercase static mut#37162
bors merged 3 commits into
rust-lang:masterfrom
matklad:static-mut-lint

Conversation

@matklad

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

r? @arielb1

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

@matklad
matkladforce-pushed the static-mut-lint branch 2 times, most recently from 5147918 to 6f216f6CompareOctober 14, 2016 13:22

@jseyfriedjseyfried left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! r=me with the comment addressed.

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

@jseyfriedjseyfriedOct 15, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 17, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 066d62d has been approved by jseyfried

@bors

bors commented Oct 17, 2016

Copy link
Copy Markdown
Collaborator

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

bors added a commit that referenced this pull request Oct 17, 2016
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

Copy link
Copy Markdown
ContributorAuthor

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

@alexcrichton

Copy link
Copy Markdown
Member

Yeah, let's tag

@alexcrichtonalexcrichton added the relnotes Marks issues that should be documented in the release notes of the next release. label Oct 17, 2016
@bors
bors merged commit 066d62d into rust-lang:masterOct 17, 2016
@matklad
matklad deleted the static-mut-lint branch July 9, 2019 12:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@matklad@rust-highfive@jseyfried@bors@alexcrichton@arielb1