-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying typesType: Probably requires verifiying typesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
You know how I like to suggest E-hard new lints? Sorry, this time I only have an E-hard L-enhancement to report.
warning: large size difference between variants
--> src/main.rs:66:1
|
66 | / error_chain! {
67 | | foreign_links {
68 | | Io(::std::io::Error);
69 | | Handlebars(::handlebars::TemplateRenderError);
70 | | Yaml(::yaml::Error);
71 | | }
72 | | }
| |_^
|
= note: #[warn(large_enum_variant)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.165/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
113| err : Box<$ foreign_link_error_path> ) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in a macro outside of the current crate
= issue author's remark: this help message is not helpful
Is there a way to (easily) print the enum variants with their sizes? This might be helpful even in rather obvious cases.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying typesType: Probably requires verifiying typesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy