Skip to content

Commit 8b8041e

Browse files
committed
Update tests
1 parent 7118f71 commit 8b8041e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ macro_rules! fake_lint_pass {
2929
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for $struct {
3030
fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
3131
$(
32-
if !attr::contains_name(&krate.attrs, $attr) {
32+
if !attr::contains_name(&krate.item.attrs, $attr) {
3333
cx.lint(CRATE_NOT_OKAY, |lint| {
3434
let msg = format!("crate is not marked with #![{}]", $attr);
35-
lint.build(&msg).set_span(krate.span).emit()
35+
lint.build(&msg).set_span(krate.item.span).emit()
3636
});
3737
}
3838
)*

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
2727

2828
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
2929
fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
30-
if !attr::contains_name(&krate.attrs, Symbol::intern("crate_okay")) {
30+
if !attr::contains_name(&krate.item.attrs, Symbol::intern("crate_okay")) {
3131
cx.lint(CRATE_NOT_OKAY, |lint| {
3232
lint.build("crate is not marked with #![crate_okay]")
33-
.set_span(krate.span)
33+
.set_span(krate.item.span)
3434
.emit()
3535
});
3636
}

0 commit comments

Comments
 (0)