Merge pull request #802 from rtfeldman/large_enum_comment

Replaced large_enum_variant explanation with link to issue #800
This commit is contained in:
Richard Feldman 2020-12-14 22:08:05 -05:00 committed by GitHub
commit 46a84fcbca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 21 additions and 200 deletions

View file

@ -1,14 +1,5 @@
#![warn(clippy::all, clippy::dbg_macro)]
// I'm skeptical that clippy:large_enum_variant is a good lint to have globally enabled.
//
// It warns about a performance problem where the only quick remediation is
// to allocate more on the heap, which has lots of tradeoffs - including making it
// long-term unclear which allocations *need* to happen for compilation's sake
// (e.g. recursive structures) versus those which were only added to appease clippy.
//
// Effectively optimizing data struture memory layout isn't a quick fix,
// and encouraging shortcuts here creates bad incentives. I would rather temporarily
// re-enable this when working on performance optimizations than have it block PRs.
// See github.com/rtfeldman/roc/issues/800 for discussion of the large_enum_variant check.
#![allow(clippy::large_enum_variant)]
pub mod llvm;