]> git.lizzy.rs Git - rust.git/blob - tests/ui/attrs.rs
removing unsafe from test fn's && renaming shrink to sugg_span
[rust.git] / tests / ui / attrs.rs
1 #![warn(clippy::inline_always, clippy::deprecated_semver)]
2 #![allow(clippy::assertions_on_constants)]
3 #![allow(clippy::missing_docs_in_private_items, clippy::panic, clippy::unreachable)]
4
5 #[inline(always)]
6 fn test_attr_lint() {
7     assert!(true)
8 }
9
10 #[inline(always)]
11 fn false_positive_expr() {
12     unreachable!()
13 }
14
15 #[inline(always)]
16 fn false_positive_stmt() {
17     unreachable!();
18 }
19
20 #[inline(always)]
21 fn empty_and_false_positive_stmt() {
22     unreachable!();
23 }
24
25 #[deprecated(since = "forever")]
26 pub const SOME_CONST: u8 = 42;
27
28 #[deprecated(since = "1")]
29 pub const ANOTHER_CONST: u8 = 23;
30
31 #[deprecated(since = "0.1.1")]
32 pub const YET_ANOTHER_CONST: u8 = 0;
33
34 fn main() {
35     test_attr_lint();
36     if false {
37         false_positive_expr()
38     }
39     if false {
40         false_positive_stmt()
41     }
42     if false {
43         empty_and_false_positive_stmt()
44     }
45 }