File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/test/ui-fulldeps/auxiliary Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ macro_rules! fake_lint_pass {
29
29
impl <' a, ' tcx> LateLintPass <' a, ' tcx> for $struct {
30
30
fn check_crate( & mut self , cx: & LateContext , krate: & rustc_hir:: Crate ) {
31
31
$(
32
- if !attr:: contains_name( & krate. attrs, $attr) {
32
+ if !attr:: contains_name( & krate. item . attrs, $attr) {
33
33
cx. lint( CRATE_NOT_OKAY , |lint| {
34
34
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( )
36
36
} ) ;
37
37
}
38
38
) *
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
27
27
28
28
impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for Pass {
29
29
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" ) ) {
31
31
cx. lint ( CRATE_NOT_OKAY , |lint| {
32
32
lint. build ( "crate is not marked with #![crate_okay]" )
33
- . set_span ( krate. span )
33
+ . set_span ( krate. item . span )
34
34
. emit ( )
35
35
} ) ;
36
36
}
You can’t perform that action at this time.
0 commit comments