File tree 3 files changed +14
-6
lines changed
tests/ui/stability-attribute
3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -876,10 +876,10 @@ pub fn find_deprecation(
876
876
sess. emit_err ( session_diagnostics:: InvalidSince { span : attr. span } ) ;
877
877
Some ( DeprecatedSince :: Err )
878
878
}
879
- } else if is_rustc {
880
- sess. emit_err ( session_diagnostics:: MissingSince { span : attr. span } ) ;
881
- continue ;
882
879
} else {
880
+ if is_rustc {
881
+ sess. emit_err ( session_diagnostics:: MissingSince { span : attr. span } ) ;
882
+ }
883
883
None
884
884
} ;
885
885
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ mod bogus_attribute_types_2 {
19
19
20
20
#[ stable( feature = "a" , since = "3.3.3" ) ]
21
21
#[ deprecated] //~ ERROR missing 'since'
22
+ //~^ ERROR missing 'note'
22
23
fn f5 ( ) { }
23
24
24
25
#[ stable( feature = "a" , since = "3.3.3" ) ]
Original file line number Diff line number Diff line change @@ -28,12 +28,19 @@ error[E0542]: missing 'since'
28
28
LL | #[deprecated]
29
29
| ^^^^^^^^^^^^^
30
30
31
+ error[E0543]: missing 'note'
32
+ --> $DIR/stability-attribute-sanity-4.rs:21:5
33
+ |
34
+ LL | #[deprecated]
35
+ | ^^^^^^^^^^^^^
36
+
31
37
error[E0542]: missing 'since'
32
- --> $DIR/stability-attribute-sanity-4.rs:25 :5
38
+ --> $DIR/stability-attribute-sanity-4.rs:26 :5
33
39
|
34
40
LL | #[deprecated = "a"]
35
41
| ^^^^^^^^^^^^^^^^^^^
36
42
37
- error: aborting due to 6 previous errors
43
+ error: aborting due to 7 previous errors
38
44
39
- For more information about this error, try `rustc --explain E0542`.
45
+ Some errors have detailed explanations: E0542, E0543.
46
+ For more information about an error, try `rustc --explain E0542`.
You can’t perform that action at this time.
0 commit comments