implement -Z ignore-directory-in-diagnostics-source-blocks
This commit is contained in:
parent
56e1aaadb3
commit
d695b95e3b
5 changed files with 49 additions and 7 deletions
|
@ -1536,6 +1536,8 @@ options! {
|
|||
"generate human-readable, predictable names for codegen units (default: no)"),
|
||||
identify_regions: bool = (false, parse_bool, [UNTRACKED],
|
||||
"display unnamed regions as `'<id>`, using a non-ident unique id (default: no)"),
|
||||
ignore_directory_in_diagnostics_source_blocks: Vec<String> = (Vec::new(), parse_string_push, [UNTRACKED],
|
||||
"do not display the source code block in diagnostics for files in the directory"),
|
||||
incremental_ignore_spans: bool = (false, parse_bool, [TRACKED],
|
||||
"ignore spans during ICH computation -- used for testing (default: no)"),
|
||||
incremental_info: bool = (false, parse_bool, [UNTRACKED],
|
||||
|
|
|
@ -1295,7 +1295,10 @@ fn default_emitter(
|
|||
.diagnostic_width(sopts.diagnostic_width)
|
||||
.macro_backtrace(macro_backtrace)
|
||||
.track_diagnostics(track_diagnostics)
|
||||
.terminal_url(terminal_url);
|
||||
.terminal_url(terminal_url)
|
||||
.ignored_directories_in_source_blocks(
|
||||
sopts.unstable_opts.ignore_directory_in_diagnostics_source_blocks.clone(),
|
||||
);
|
||||
Box::new(emitter.ui_testing(sopts.unstable_opts.ui_testing))
|
||||
}
|
||||
}
|
||||
|
@ -1312,7 +1315,10 @@ fn default_emitter(
|
|||
track_diagnostics,
|
||||
terminal_url,
|
||||
)
|
||||
.ui_testing(sopts.unstable_opts.ui_testing),
|
||||
.ui_testing(sopts.unstable_opts.ui_testing)
|
||||
.ignored_directories_in_source_blocks(
|
||||
sopts.unstable_opts.ignore_directory_in_diagnostics_source_blocks.clone(),
|
||||
),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue