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