File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -606,11 +606,12 @@ pub trait LintContext: Sized {
606
606
"{}({}) overruled by outer forbid({})" ,
607
607
level. as_str( ) , lint_name,
608
608
lint_name) ;
609
+ diag_builder. span_label ( span, & format ! ( "overruled by previous forbid" ) ) ;
609
610
match now_source {
610
611
LintSource :: Default => & mut diag_builder,
611
612
LintSource :: Node ( forbid_source_span) => {
612
- diag_builder. span_note ( forbid_source_span,
613
- "`forbid` lint level set here" )
613
+ diag_builder. span_label ( forbid_source_span,
614
+ & format ! ( "`forbid` level set here" ) )
614
615
} ,
615
616
LintSource :: CommandLine => {
616
617
diag_builder. note ( "`forbid` lint level was set on command line" )
Original file line number Diff line number Diff line change 15
15
#![ plugin( lint_plugin_test) ]
16
16
#![ forbid( test_lint) ]
17
17
//~^ NOTE lint level defined here
18
- //~| NOTE `forbid` lint level set here
18
+ //~| NOTE `forbid` level set here
19
19
20
20
fn lintme ( ) { } //~ ERROR item is named 'lintme'
21
21
22
- #[ allow( test_lint) ] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint)
22
+ #[ allow( test_lint) ]
23
+ //~^ ERROR allow(test_lint) overruled by outer forbid(test_lint)
24
+ //~| NOTE overruled by previous forbid
23
25
pub fn main ( ) {
24
26
lintme ( ) ;
25
27
}
Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
#![ forbid( non_snake_case) ]
12
+ //~^ NOTE `forbid` level set here
12
13
13
- #[ allow( non_snake_case) ] //~ ERROR E0453
14
+ #[ allow( non_snake_case) ]
15
+ //~^ ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
16
+ //~| NOTE overruled by previous forbid
14
17
fn main ( ) {
15
18
}
Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
#![ forbid( deprecated) ]
12
- //~^ NOTE `forbid` lint level set here
12
+ //~^ NOTE `forbid` level set here
13
13
14
- #[ allow( deprecated) ] //~ ERROR allow(deprecated) overruled by outer forbid(deprecated)
14
+ #[ allow( deprecated) ]
15
+ //~^ ERROR allow(deprecated) overruled by outer forbid(deprecated)
16
+ //~| NOTE overruled by previous forbid
15
17
fn main ( ) {
16
18
}
You can’t perform that action at this time.
0 commit comments