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 {
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 ) *
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
2727
2828impl < ' 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 }
You can’t perform that action at this time.
0 commit comments