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
Add warning control #190
Comments
How to create a static array and return a slice of it? --> src/lib.rs:164:34
|
164 | ToolFamily::Msvc => &["/Wall"],
| ^^^^^^^^-
| | |
| | temporary value only lives until here
| does not live long enough
|
= note: borrowed value must be valid for the static lifetime... Method: /// What the flags to enable all warnings
fn warnings_flags(&self) -> &'static [&'static str] {
match *self {
ToolFamily::Msvc => &["/Wall"],
ToolFamily::Gnu => &["-Wall", "-Wpedantic", "-Wextra"],
ToolFamily::Clang => &["-Weverything"],
}
} |
Hm I thought it was like that but I guess not :(. Maybe try making this not a method but instead a temporary in a function? |
I'm unsure about it.
|
I agree with @pornel. Warnings enabled seems like the wrong default for the way this crate is usually used, and I would never want to use warnings-as-errors. |
Do a few things:
warnings_as_errors
that turns warnings into errors in a compiler specific wayWe haven't discussed this, but if we enable maximum warnings by default, it seems like some users will not want that and a way to turn it off. So it seems like we should also add a
default_warnings
method that declines to set the maximum warnings.The text was updated successfully, but these errors were encountered: