Skip to content

Commit d91b965

Browse files
committed
libtest: Make --report-time an unstable option
1 parent c16a547 commit d91b965

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/libtest/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,13 @@ pub fn parse_opts(args: &[String]) -> Option<OptRes> {
566566
));
567567
}
568568

569+
let report_time = matches.opt_present("report-time");
570+
if !allow_unstable && report_time {
571+
return Some(Err(
572+
"The \"report-time\" flag is only accepted on the nightly compiler".into(),
573+
));
574+
}
575+
569576
let run_ignored = match (include_ignored, matches.opt_present("ignored")) {
570577
(true, true) => {
571578
return Some(Err(
@@ -579,7 +586,6 @@ pub fn parse_opts(args: &[String]) -> Option<OptRes> {
579586
let quiet = matches.opt_present("quiet");
580587
let exact = matches.opt_present("exact");
581588
let list = matches.opt_present("list");
582-
let report_time = matches.opt_present("report-time");
583589

584590
let logfile = matches.opt_str("logfile");
585591
let logfile = logfile.map(|s| PathBuf::from(&s));

0 commit comments

Comments
 (0)