Skip to content

Properly reimplement unsafe-code lint to honor changing lint attributes #22752

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
Feb 25, 2015
Merged

Properly reimplement unsafe-code lint to honor changing lint attributes #22752

merged 1 commit into from
Feb 25, 2015

Conversation

ipetkov
Copy link
Contributor

@ipetkov ipetkov commented Feb 24, 2015

This allows selectively disabling the lint for individual methods or traits.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

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

@oli-obk
Copy link
Contributor

oli-obk commented Feb 24, 2015

the lint is there to detect unsafe code. If your project forbids unsafe code, don't use it. Allowing to disable the lint after it has been enabled breaks this "contract" imho. This is becoming a somewhat circular argument then. [sarcasm] If this is implemented, i want a lint checking for attributes that disable the lint. [/sarcasm]

[edit] oh sorry, you are not changing the behavior. it already is the current behavior... oh well... don't mind me

@ipetkov
Copy link
Contributor Author

ipetkov commented Feb 24, 2015

@oli-obk yeah in my previous update of the lint's functionality caused it to not behave correctly according to the linting system the way any user (including myself) would expect it to behave, and this patch is meant to fix that.

Also a project can always use the forbid lint level to prevent disabling the lint on individual items.

@alexcrichton
Copy link
Member

@bors: r+ fcf7023

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
…hton

 This allows selectively disabling the lint for individual methods or traits.
@bors
Copy link
Collaborator

bors commented Feb 25, 2015

⌛ Testing commit fcf7023 with merge 4818d9a...

@bors
Copy link
Collaborator

bors commented Feb 25, 2015

💔 Test failed - auto-linux-64-x-android-t

@bors bors merged commit fcf7023 into rust-lang:master Feb 25, 2015
@ipetkov ipetkov deleted the unsafe-lint-fix branch February 25, 2015 23:14
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.

5 participants