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 warning when unsafe blocks or functions do nothing unsafe #1913

Closed
brson opened this issue Feb 29, 2012 · 3 comments
Closed

Lint warning when unsafe blocks or functions do nothing unsafe #1913

brson opened this issue Feb 29, 2012 · 3 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@brson
Copy link
Contributor

brson commented Feb 29, 2012

No description provided.

@ghost ghost assigned lht Mar 8, 2012
@catamorphism
Copy link
Contributor

assigned to @lht , who appears to be responsible for many things linty.

@catamorphism
Copy link
Contributor

Cleared assignee.

@catamorphism
Copy link
Contributor

More important than "enhancement" now, IMO.

bors added a commit that referenced this issue Apr 15, 2013
Closes #5487, #1913, and #4568

I tracked this by adding all used unsafe blocks/functions to a set on the `tcx` passed around, and then when the lint pass comes around if an unsafe block/function isn't listed in that set, it's unused.

I also removed everything from the compiler that was unused, and up to stage2 is now compiling without any known unused unsafe blocks.

I chose `unused_unsafe` as the name of the lint attribute, but there may be a better name...
@sanxiyn sanxiyn closed this as completed Apr 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

4 participants