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

Warn or error on path statements #400

Closed
brson opened this issue May 22, 2011 · 2 comments
Closed

Warn or error on path statements #400

brson opened this issue May 22, 2011 · 2 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@brson
Copy link
Contributor

brson commented May 22, 2011

This is pretty useless and error prone:

fn do_something_important() {
}

fn main() {
  do_something_important;
}

It's just mentioning a function, when the user probably wanted to call it. Note that it's not useless when leaving off the semi.

@brson
Copy link
Contributor Author

brson commented May 24, 2011

Looks like compile-fail/does-nothing.rs is testing this or something similar

@catamorphism
Copy link
Contributor

does_nothing tests the case where do_something_important is unresolved. This is a different situation.

@ghost ghost assigned catamorphism Mar 15, 2012
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Add netlink constants

Add netlink constants from linux/netlink.h

Signed-off-by: Jana Radhakrishnan <mrjana@gmail.com>
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
oli-obk pushed a commit to oli-obk/rust that referenced this issue May 2, 2020
Add lint on large non scalar const

This PR adds the new lint `non_scalar_const` that aims to warn against `const` declaration of large arrays. For performance, because of inlining, large arrays should be preferably declared as `static`.

Note: i made this one to warn on all const arrays, whether they are in a body function or not. I don't know if this is really necessary, i could just reduce this lint to variables out of function scope.

Fixes: rust-lang#400

changelog: add new lint for large non-scalar types declared as const
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Oct 26, 2020
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.49 to 0.2.50.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.49...0.2.50)

Signed-off-by: dependabot[bot] <support@dependabot.com>
dpaoliello pushed a commit to dpaoliello/rust that referenced this issue Mar 22, 2024
feat: add SIMD float math functions (exp, exp2, log, log2, log10, sin…
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.
Projects
None yet
Development

No branches or pull requests

3 participants