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