@@ -123,7 +123,8 @@ pub fn run(input_path: &Path,
123
123
maybe_sysroot,
124
124
Some ( codemap) ,
125
125
None ,
126
- linker) ;
126
+ linker,
127
+ edition) ;
127
128
128
129
{
129
130
let map = hir:: map:: map_crate ( & sess, & cstore, & mut hir_forest, & defs) ;
@@ -183,8 +184,7 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
183
184
externs : Externs ,
184
185
should_panic : bool , no_run : bool , as_test_harness : bool ,
185
186
compile_fail : bool , mut error_codes : Vec < String > , opts : & TestOptions ,
186
- maybe_sysroot : Option < PathBuf > ,
187
- linker : Option < PathBuf > ) {
187
+ maybe_sysroot : Option < PathBuf > , linker : Option < PathBuf > , edition : Edition ) {
188
188
// the test harness wants its own `main` & top level functions, so
189
189
// never wrap the test in `fn main() { ... }`
190
190
let ( test, line_offset) = make_test ( test, Some ( cratename) , as_test_harness, opts) ;
@@ -210,6 +210,10 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
210
210
} ,
211
211
test : as_test_harness,
212
212
unstable_features : UnstableFeatures :: from_environment ( ) ,
213
+ debugging_opts : config:: DebuggingOptions {
214
+ edition,
215
+ ..config:: basic_debugging_options ( )
216
+ } ,
213
217
..config:: basic_options ( ) . clone ( )
214
218
} ;
215
219
@@ -473,13 +477,14 @@ pub struct Collector {
473
477
codemap : Option < Lrc < CodeMap > > ,
474
478
filename : Option < PathBuf > ,
475
479
linker : Option < PathBuf > ,
480
+ edition : Edition ,
476
481
}
477
482
478
483
impl Collector {
479
484
pub fn new ( cratename : String , cfgs : Vec < String > , libs : SearchPaths , externs : Externs ,
480
485
use_headers : bool , opts : TestOptions , maybe_sysroot : Option < PathBuf > ,
481
486
codemap : Option < Lrc < CodeMap > > , filename : Option < PathBuf > ,
482
- linker : Option < PathBuf > ) -> Collector {
487
+ linker : Option < PathBuf > , edition : Edition ) -> Collector {
483
488
Collector {
484
489
tests : Vec :: new ( ) ,
485
490
names : Vec :: new ( ) ,
@@ -494,6 +499,7 @@ impl Collector {
494
499
codemap,
495
500
filename,
496
501
linker,
502
+ edition,
497
503
}
498
504
}
499
505
@@ -513,6 +519,7 @@ impl Collector {
513
519
let opts = self . opts . clone ( ) ;
514
520
let maybe_sysroot = self . maybe_sysroot . clone ( ) ;
515
521
let linker = self . linker . clone ( ) ;
522
+ let edition = self . edition ;
516
523
debug ! ( "Creating test {}: {}" , name, test) ;
517
524
self . tests . push ( testing:: TestDescAndFn {
518
525
desc : testing:: TestDesc {
@@ -543,7 +550,8 @@ impl Collector {
543
550
error_codes,
544
551
& opts,
545
552
maybe_sysroot,
546
- linker)
553
+ linker,
554
+ edition)
547
555
} ) )
548
556
} {
549
557
Ok ( ( ) ) => ( ) ,
0 commit comments