-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fixes reported bugs in Rust Coverage #79958
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -677,12 +677,12 @@ macro_rules! options { | |
} | ||
|
||
fn parse_symbol_mangling_version( | ||
slot: &mut SymbolManglingVersion, | ||
slot: &mut Option<SymbolManglingVersion>, | ||
v: Option<&str>, | ||
) -> bool { | ||
*slot = match v { | ||
Some("legacy") => SymbolManglingVersion::Legacy, | ||
Some("v0") => SymbolManglingVersion::V0, | ||
Some("legacy") => Some(SymbolManglingVersion::Legacy), | ||
Some("v0") => Some(SymbolManglingVersion::V0), | ||
_ => return false, | ||
}; | ||
true | ||
|
@@ -970,7 +970,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, | |
mir_emit_retag: bool = (false, parse_bool, [TRACKED], | ||
"emit Retagging MIR statements, interpreted e.g., by miri; implies -Zmir-opt-level=0 \ | ||
(default: no)"), | ||
mir_opt_level: usize = (1, parse_uint, [TRACKED], | ||
mir_opt_level: Option<usize> = (None, parse_opt_uint, [TRACKED], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a reason for making this an Option, it doesn't change its default dependent on coverage like symbol mangling does. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know of any other way to know if the option was set on the command line or not. I need to know that in config.rs when checking for conflicting command line flags. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I understand your point... Let me think about this a minute. I'm inclined to agree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me the value matters more than if it was overridden (which you know it was today if it's > 1).. if the default were changed to 2, we would still want this to fire to warn people who were using coverage. (Probably we'd either keep the default as 1 if coverage were enabled, or add support for inlining counters. But it's unlikely that we turn on inlining by default anytime soon.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, yes, I concur. I'll remove the option from mir_opt_level. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I agree 100%. Thanks. |
||
"MIR optimization level (0-3; default: 1)"), | ||
mutable_noalias: bool = (false, parse_bool, [TRACKED], | ||
"emit noalias metadata for mutable references (default: no)"), | ||
|
@@ -1088,9 +1088,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, | |
"hash algorithm of source files in debug info (`md5`, `sha1`, or `sha256`)"), | ||
strip: Strip = (Strip::None, parse_strip, [UNTRACKED], | ||
"tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)"), | ||
symbol_mangling_version: SymbolManglingVersion = (SymbolManglingVersion::Legacy, | ||
symbol_mangling_version: Option<SymbolManglingVersion> = (None, | ||
parse_symbol_mangling_version, [TRACKED], | ||
"which mangling version to use for symbol names"), | ||
"which mangling version to use for symbol names ('legacy' (default) or 'v0')"), | ||
teach: bool = (false, parse_bool, [TRACKED], | ||
"show extended diagnostic help (default: no)"), | ||
terminal_width: Option<usize> = (None, parse_opt_uint, [UNTRACKED], | ||
|
Uh oh!
There was an error while loading. Please reload this page.