Skip to content

Commit fcdfaf0

Browse files
committed
Fix fulldeps tests.
1 parent 6459750 commit fcdfaf0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ macro_rules! fake_lint_pass {
3232
$(
3333
if !cx.sess().contains_name(attrs, $attr) {
3434
cx.lint(CRATE_NOT_OKAY, |lint| {
35+
let span = cx.tcx.hir().span(rustc_hir::CRATE_HIR_ID);
3536
let msg = format!("crate is not marked with #![{}]", $attr);
36-
lint.build(&msg).set_span(krate.item.span).emit()
37+
lint.build(&msg).set_span(span).emit()
3738
});
3839
}
3940
)*

src/test/ui-fulldeps/auxiliary/lint-for-crate.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ impl<'tcx> LateLintPass<'tcx> for Pass {
3030
let attrs = cx.tcx.hir().attrs(rustc_hir::CRATE_HIR_ID);
3131
if !cx.sess().contains_name(attrs, Symbol::intern("crate_okay")) {
3232
cx.lint(CRATE_NOT_OKAY, |lint| {
33+
let span = cx.tcx.hir().span(rustc_hir::CRATE_HIR_ID);
3334
lint.build("crate is not marked with #![crate_okay]")
34-
.set_span(krate.item.span)
35+
.set_span(span)
3536
.emit()
3637
});
3738
}

0 commit comments

Comments
 (0)