Skip to content

Lint functions taking !Copy values by value, but only use them by ref #1551

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

Closed
oli-obk opened this issue Feb 17, 2017 · 0 comments
Closed

Lint functions taking !Copy values by value, but only use them by ref #1551

oli-obk opened this issue Feb 17, 2017 · 0 comments
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. T-middle Type: Probably requires verifiying types

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Feb 17, 2017

an example:

fn foo(v: Vec<T>) {
    assert_eq!(v.len(), 42);
}

should suggest

fn foo(v: &Vec<T>) {
    assert_eq!(v.len(), 42);
}

further lints may apply

@oli-obk oli-obk added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. A-lint Area: New lints T-middle Type: Probably requires verifiying types labels Feb 17, 2017
sinkuu added a commit to sinkuu/rust-clippy that referenced this issue Feb 18, 2017
sinkuu added a commit to sinkuu/rust-clippy that referenced this issue Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

1 participant