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

needless_pass_by_value on annotation? #1876

Closed
Dandandan opened this issue Jul 7, 2017 · 1 comment
Closed

needless_pass_by_value on annotation? #1876

Dandandan opened this issue Jul 7, 2017 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy

Comments

@Dandandan
Copy link

I use Rocket with Rust nightly. Clippy gives me this suggestion (that doesn't compile of course).

warning: this argument is passed by value, but not consumed in the function body
--> src/main.rs:23:1
|
23 | #[get("/")]
| ^^^^^^^^^^^ help: consider taking a reference instead &#[get("/")]
|
= note: #[warn(needless_pass_by_value)] on by default
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_pass_by_value

@oli-obk oli-obk added A-musing good-first-issue These issues are a good way to get started with Clippy C-bug Category: Clippy is not doing the correct thing labels Jul 7, 2017
@Cxarli
Copy link

Cxarli commented Oct 16, 2017

I just got the same warning. &#[get("/")] is not valid though. I'm also using Rocket, but it seems to come from Hyper.

sinkuu added a commit to sinkuu/rust-clippy that referenced this issue Oct 17, 2017
sinkuu added a commit to sinkuu/rust-clippy that referenced this issue Oct 17, 2017
gbip pushed a commit to gbip/rust-clippy that referenced this issue Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

No branches or pull requests

4 participants