Code Monkey home page Code Monkey logo

Comments (3)

tamird avatar tamird commented on August 23, 2024

I agree with all of this except:

we won't need to care for the few remaining false positives, right?

I don't think false positives are something people should live with and suppress on a case-by-case basis.

from rust-clippy.

llogiq avatar llogiq commented on August 23, 2024

@tamird Thanks for the heads-up. Just to clarify: A false positive in this case would be using an item (trait or type impl) that has a .len(), but no .is_empty() method (and that would have been flagged by this lint). So I think the cost of suppressing the one or two stray false positives is outweighed by the benefit of the lint I have for issue #32 without method lookup.

Please note that this is only an interim solution until rustc_typeck is made accessible to third party lint writers. The process to do this has already begun, so it's only a matter of time until we can do the method lookup and get rid of the remaining false positives.

from rust-clippy.

Manishearth avatar Manishearth commented on August 23, 2024

Note that this crate is about lints, and false positives if not too common are okay.

A lot of the things here, like Box<Vec<T>> have legitimate uses too, but very few especially from a newbie perspective.

from rust-clippy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.