diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2016-11-10 19:08:21 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-11-28 04:18:11 +0200 |
| commit | 9aaf26e7aa4068d7e5643b136fb70ecd689a746d (patch) | |
| tree | 60fdabfe4a91fa16c2b24d8d310bc3ff50ca28cc /src/libsyntax/test.rs | |
| parent | f97c132cac79ef6bdf9f950b415c67bb43af387a (diff) | |
| download | rust-9aaf26e7aa4068d7e5643b136fb70ecd689a746d.tar.gz rust-9aaf26e7aa4068d7e5643b136fb70ecd689a746d.zip | |
rustc: rework stability to be on-demand for type-directed lookup.
Diffstat (limited to 'src/libsyntax/test.rs')
| -rw-r--r-- | src/libsyntax/test.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index 4de3baf7d14..fca89e265e4 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -307,7 +307,7 @@ fn generate_test_harness(sess: &ParseSess, /// The expanded code calls some unstable functions in the test crate. fn ignored_span(cx: &TestCtxt, sp: Span) -> Span { let info = ExpnInfo { - call_site: DUMMY_SP, + call_site: sp, callee: NameAndSpan { format: MacroAttribute(Symbol::intern("test")), span: None, @@ -460,6 +460,7 @@ mod __test { fn mk_std(cx: &TestCtxt) -> P<ast::Item> { let id_test = Ident::from_str("test"); + let sp = ignored_span(cx, DUMMY_SP); let (vi, vis, ident) = if cx.is_test_crate { (ast::ItemKind::Use( P(nospan(ast::ViewPathSimple(id_test, @@ -474,7 +475,7 @@ fn mk_std(cx: &TestCtxt) -> P<ast::Item> { node: vi, attrs: vec![], vis: vis, - span: DUMMY_SP + span: sp }) } @@ -598,7 +599,7 @@ fn mk_tests(cx: &TestCtxt) -> P<ast::Item> { // FIXME #15962: should be using quote_item, but that stringifies // __test_reexports, causing it to be reinterned, losing the // gensym information. - let sp = DUMMY_SP; + let sp = ignored_span(cx, DUMMY_SP); let ecx = &cx.ext_cx; let struct_type = ecx.ty_path(ecx.path(sp, vec